Objective Type Questions
Fill in the blanks with the correct words.
- <p> element defines a paragraph.
- HTML defines 6 levels of headings.
- <b> tag is used to make text bold.
- The tag used to center content between the left and right margins is <center>.
- The face attribute of the FONT tag is used to change the font style.
Write T for true statement and F for false one. Correct the false statement(s).
- <hr> is an empty element. TRUE
- You cannot change the color of the horizontal line. FALSE
We can change the color of the horizontal line using the color attribute. - HTML defines seven levels of headings. FALSE
HTML defines six levels of headings. - Any text placed between <!– and –> tags will be ignored by the browser. TRUE
- FONT is a container element. TRUE
Write one word for the following.
- Tag used to underline text: <u>
- The attribute of HR tag that sets the length of the line: width
- The kind of elements <h1>, <h2>, etc. are: heading
- The attribute of the FONT tag used to change the font: face
- Tags that are on the way to being discontinued: deprecated element
Answer the following.
- What is the <p> tag used for?
The <p> tag lets us define paragraphs. - What are the tags for adding comments to an HTML document?
<!– comment goes here –> - Write the expansion of the following tags: <hr>, <b>, <u>.
hr means horizontal rule, b means bold and u means underline. - What is the use of the NOSHADE attribute of the <hr> tag?
The NOSHADE attribute displays a solid line without shading. - What can be the different values of ALIGN attribute of the HR tag?
LEFT, CENTER or RIGHT. - Give examples of the two different ways of specifying the length of a horizontal line.
<hr width = “100”>
<hr width = “50%”> - Identify the error in the following and then write the correct code.
<hr thickness = “45” COLOR = “red”>
To set the thickness, we use the size attribute.
<hr size = “45” COLOR = “red”> - Write the code to display Hello, World bold faced and underlined, in the center of the page, and in size 8.
<center><u><b><font size = “8”>Hello, World</font></b></u></center>
Choose the correct option.
- How many heading levels does HTML have?
a) 5
b) 6
c) 7
d) None of these - Which of the following is not an attribute of the <hr> tag?
a) ALIGN
b) WIDTH
c) BGCOLOR
d) SIZE - Which attribute of the <hr> tag is used to define the horizontal width of the line?
a) ALIGN
b) WIDTH
c) THICKNESS
d) None of these - Which is the tag used to insert a line break?
a) <br>
b) <linebr>
c) <break>
d) None of these - Text after which of the following tags is ignored by Web browsers?
a) <!–
b) <hr>
c) <hn>
d) None of these - Which of the following are container elements?
a) Bold
b) Italics
c) Underline
d) All of these - Which tag makes text bold?
a) <bold>
b) <b>
c) <textb>
d) None of these - Which tag will you used to display underline?
a) <u>
b) <underline>
c) <b>
d) None of these
Extra Questions
State whether True or False.
- Browsers insert empty lines before and after each paragraph. TRUE
- You can use comments to explain your HTML code. TRUE
- HTML 4.01 is the version in which a majority of the websites currently exist. TRUE
- HTML 5 has facility to play audio and video without the need of plugins like Flash Player. TRUE
Fill in the blanks.
- The <center> tag is deprecated in HTML 4.01.
- The <sub> tag is used to display the enclosed text as subscript i.e. at a lower level than the rest of the text.
- The <sup> tag is used to display the enclosed text as superscript i.e. at a higher level than the rest of the text.
- HTML 5 is now the official standard for HTML.