HTML Know-How Quiz: Test Your Medium-Level Web Skills! Quiz

  1. HTML Structure

    Which tag is used to define the main content section of an HTML document that is unique and not repeated across pages?

    1. u003Csectionu003E
    2. u003Cmainu003E
    3. u003Cbodyyu003E
    4. u003Carticleu003E
    5. u003Cdivvu003E
  2. Hyperlink Reference

    Suppose you want to add a hyperlink to another website in HTML; which attribute must you include in the u003Cau003E tag to specify the destination URL?

    1. href
    2. src
    3. ref
    4. link
    5. hrref
  3. HTML Lists

    You want to create a numbered list of steps in HTML. Which tag should enclose the list items?

    1. u003Culu003E
    2. u003Colu003E
    3. u003Cliiu003E
    4. u003Cdlu003E
    5. u003Cllu003E
  4. Semantic Elements

    What is the primary purpose of the u003Cheaderu003E element in HTML?

    1. To display an image at the top
    2. To group introductory content or navigational links
    3. To add a heading level 1
    4. To define meta information
    5. To insert an external style
  5. Image Attributes

    Which attribute is mandatory for the u003Cimgu003E tag to ensure accessibility?

    1. src
    2. alt
    3. title
    4. href
    5. alttext
  6. Input Types

    In HTML5, which value of the type attribute for u003Cinputu003E defines a control for selecting a date?

    1. time
    2. date
    3. datepicker
    4. calendar
    5. datte
  7. Form Controls

    What is the correct way to associate a label with a form input in HTML?

    1. Using the class attribute
    2. Placing input inside the label
    3. Adding a name attribute
    4. Using the for attribute on the label and matching id on the input
    5. Assigning a src attribute
  8. Table Headers

    In an HTML table, which tag is used to define a table cell as a header, typically displayed in bold and centered?

    1. u003Ctdu003E
    2. u003Cheaderu003E
    3. u003Cthu003E
    4. u003Ctblhu003E
    5. u003Ctheadu003E
  9. Audio Embedding

    How do you properly include a playable audio file in an HTML5 page?

    1. u003Caudio src='sound.mp3' controlsu003Eu003C/audiou003E
    2. u003Csound src='sound.mp3' playu003E
    3. u003Cmedia audio='sound.mp3' controlsu003E
    4. u003Caudiio src='sound.mp3'u003E
    5. u003Caudio href='sound.mp3'u003E
  10. Block vs Inline Elements

    Which of the following tags is classified as a block-level element in HTML by default?

    1. u003Cspanu003E
    2. u003Cdivu003E
    3. u003Cimgu003E
    4. u003Cau003E
    5. u003Csppanu003E