HTML Fundamentals Quiz Quiz

  1. DOCTYPE Declaration

    What is the primary purpose of the DOCTYPE declaration in an HTML document?

    1. To define the character encoding for the document.
    2. To specify the styling of the HTML elements.
    3. To specify the document type and HTML version being used.
    4. To link external style sheets to the document.
    5. To declare a java function
  2. HTML5 Semantic Elements

    Which HTML5 element is typically used to define the introductory section of a webpage, often containing logos and navigation?

    1. u003Cnavu003E
    2. u003Csectionu003E
    3. u003Cheaderu003E
    4. u003Cfooteru003E
    5. u003Carticleu003E
  3. Meta Tag Attributes

    Which attribute of the meta tag is used to provide a brief summary of the webpage's content for search engines?

    1. charset
    2. viewport
    3. content
    4. name
    5. http-equiv
  4. ID vs. Class

    In HTML, which attribute should be used to uniquely identify a single element on a page for styling or JavaScript manipulation?

    1. class
    2. style
    3. id
    4. name
    5. unique
  5. Embedding Multimedia

    Which HTML5 tag is used to embed a video file into a webpage?

    1. u003Caudiou003E
    2. u003Cimgu003E
    3. u003Cmediau003E
    4. u003Csourceu003E
    5. u003Cvideou003E
  6. Accessibility Alt Text

    What is the primary purpose of the 'alt' attribute in an image tag?

    1. To specify the image file name.
    2. To define the image's dimensions.
    3. To provide alternative text for visually impaired users.
    4. To set the image's alignment on the page.
    5. To improve page load speed
  7. HTML Data Attributes

    What is the purpose of HTML data attributes, denoted by 'data-*'?

    1. To define custom styles for an element.
    2. To link external JavaScript files.
    3. To store custom data on elements for web development.
    4. To specify the character encoding of the document.
    5. To create a database connection
  8. Inline vs Block

    Which of the following HTML elements is an example of a block-level element?

    1. u003Cspanu003E
    2. u003Cau003E
    3. u003Cdivu003E
    4. u003Cemu003E
    5. u003Cimgu003E
  9. Script Loading

    What is the primary difference between u003Cscript asyncu003E and u003Cscript deferu003E?

    1. async scripts are executed after the HTML is parsed, while defer scripts are executed before the HTML is parsed.
    2. async scripts execute in order, while defer scripts execute out of order.
    3. async scripts download without blocking HTML parsing and execute when available, while defer scripts download without blocking parsing and execute after HTML parsing is complete.
    4. async scripts are used for internal scripts, while defer scripts are used for external scripts.
    5. They are synonyms and interchangeable
  10. Linking Documents

    In the context of HTML links, what is the purpose of the 'rel' attribute?

    1. To specify the target window for the link.
    2. To define the styling of the link.
    3. To specify the relationship between the current document and the linked document.
    4. To set the title attribute for the link.
    5. To specify the size of the link.