Create New Post

HTML MCQs - 6

  1. Which HTML tag is used to define a navigation menu within a webpage?

    • A) <nav>
    • B) <menu>
    • C) <navigation>
    • D) <navbar>

    Answer: A) <nav>

    Explanation: The <nav> tag is specifically used to define a navigation menu within an HTML document.

  2. What is the correct HTML tag for creating a button?

    • A) <button>
    • B) <btn>
    • C) <input type="button">
    • D) <btn-input>

    Answer: A) <button>

    Explanation: The <button> tag is used to create a clickable button in HTML.

  3. Which HTML attribute is used to specify alternative text for an image?

    • A) alt
    • B) title
    • C) src
    • D) href

    Answer: A) alt

    Explanation: The "alt" attribute is used to provide alternative text for an image, which is displayed if the image cannot be loaded or for accessibility purposes.

  4. What is the correct HTML tag for defining the header of a table?

    • A) <table-header>
    • B) <thead>
    • C) <header>
    • D) <th>

    Answer: B) <thead>

    Explanation: The <thead> tag is used to define the header section of a table, containing the table's heading rows.

  5. Which HTML tag is used to define a section of quoted text?

    • A) <quote>
    • B) <blockquote>
    • C) <cite>
    • D) <q>

    Answer: B) <blockquote>

    Explanation: The <blockquote> tag is used to define a section of quoted text in HTML.

  6. What is the correct HTML tag for defining the footer of a webpage or section?

    • A) <footer>
    • B) <bottom>
    • C) <end>
    • D) <foot>

    Answer: A) <footer>

    Explanation: The <footer> tag is used to define the footer section of a webpage or section, typically containing information such as copyright notices or contact information.

  7. Which HTML tag is used to create a dropdown menu?

    • A) <menu>
    • B) <dropdown>
    • C) <select>
    • D) <option>

    Answer: C) <select>

    Explanation: The <select> tag is used to create a dropdown menu in HTML, with selectable options defined by nested <option> tags.

  8. What is the correct HTML tag for defining the main content area of a webpage?

    • A) <content>
    • B) <main>
    • C) <body>
    • D) <section>

    Answer: B) <main>

    Explanation: The <main> tag is used to define the main content area of a webpage, containing the primary content of the page.

  9. Which HTML tag is used to create a hyperlink to an email address?

    • A) <link>
    • B) <mailto>
    • C) <email>
    • D) <a>

    Answer: D) <a>

    Explanation: The <a> tag, along with the "mailto" attribute, is used to create a hyperlink to an email address in HTML.

  10. What is the correct HTML tag for adding a line of code or computer output within a paragraph?

    • A) <code>
    • B) <pre>
    • C) <output>
    • D) <samp>

    Answer: A) <code>

    Explanation: The <code> tag is used to define a piece of computer code or computer output within a paragraph of text.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

45422