Class 6

Basic HTML Commands

Objective Type Questions

Fill in the blanks with the correct words.

  1. <p> element defines a paragraph.
  2. HTML defines 6 levels of headings.
  3. <b> tag is used to make text bold.
  4. The tag used to center content between the left and right margins is <center>.
  5. 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).

  1. <hr> is an empty element. TRUE
  2. You cannot change the color of the horizontal line. FALSE
    We can change the color of the horizontal line using the color attribute.
  3. HTML defines seven levels of headings. FALSE
    HTML defines six levels of headings.
  4. Any text placed between <!– and –> tags will be ignored by the browser. TRUE
  5. FONT is a container element. TRUE

Write one word for the following.

  1. Tag used to underline text: <u>
  2. The attribute of HR tag that sets the length of the line: width
  3. The kind of elements <h1>, <h2>, etc. are: heading
  4. The attribute of the FONT tag used to change the font: face
  5. Tags that are on the way to being discontinued: deprecated element

Answer the following.

  1. What is the <p> tag used for?
    The <p> tag lets us define paragraphs.
  2. What are the tags for adding comments to an HTML document?
    <!– comment goes here –>
  3. Write the expansion of the following tags: <hr>, <b>, <u>.
    hr means horizontal rule, b means bold and u means underline.
  4. What is the use of the NOSHADE attribute of the <hr> tag?
    The NOSHADE attribute displays a solid line without shading.
  5. What can be the different values of ALIGN attribute of the HR tag?
  6. Give examples of the two different ways of specifying the length of a horizontal line.
    <hr width = “100”>
    <hr width = “50%”>
  7. 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”>
  8. 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.

  1. How many heading levels does HTML have?
    a) 5
    b) 6
    c) 7
    d) None of these
  2. Which of the following is not an attribute of the <hr> tag?
    a) ALIGN
    b) WIDTH
    c) BGCOLOR
    d) SIZE
  3. Which attribute of the <hr> tag is used to define the horizontal width of the line?
    a) ALIGN
    b) WIDTH
    d) None of these
  4. Which is the tag used to insert a line break?
    a) <br>
    b) <linebr>
    c) <break>
    d) None of these
  5. Text after which of the following tags is ignored by Web browsers?
    a) <!–
    b) <hr>
    c) <hn>
    d) None of these
  6. Which of the following are container elements?
    a) Bold
    b) Italics
    c) Underline
    d) All of these
  7. Which tag makes text bold?
    a) <bold>
    b) <b>
    c) <textb>
    d) None of these
  8. 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.

  1. Browsers insert empty lines before and after each paragraph. TRUE
  2. You can use comments to explain your HTML code. TRUE
  3. HTML 4.01 is the version in which a majority of the websites currently exist. TRUE
  4. HTML 5 has facility to play audio and video without the need of plugins like Flash Player. TRUE

Fill in the blanks.

  1. The <center> tag is deprecated in HTML 4.01.
  2. The <sub> tag is used to display the enclosed text as subscript i.e. at a lower level than the rest of the text.
  3. The <sup> tag is used to display the enclosed text as superscript i.e. at a higher level than the rest of the text.
  4. HTML 5 is now the official standard for HTML.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.