🌍 Frontend Web Development · subject

Frontend Web Development HTML & Document Structure Syllabus

The HTML & Document Structure syllabus for Frontend Web Development in full: 4 chapters and 19 topics, every one listed below, plus 51 HTML & Document Structure flashcards with answers.

4Chapters
19Topics
51Flashcards

HTML & Document Structure syllabus: all 4 chapters

Expand any chapter to see its topics and sub-topics.

  1. HTML Fundamentals

    6 topics
    • Document Structure & DOCTYPE
    • Elements, Tags & Attributes
    • Headings, Paragraphs & Text Formatting
    • Links & Anchors
    • Images & the picture element
    • Lists & Tables
  2. Semantic HTML

    4 topics
    • Semantic Layout Elements
    • Figure, Figcaption & Time
    • Document Outline & Heading Hierarchy
    • SEO & Meta Tags
  3. Forms & User Input

    5 topics
    • Form & Fieldset Structure
    • Input Types & Attributes
    • Labels & Accessible Association
    • Select, Textarea & Buttons
    • Native Form Validation
  4. Multimedia & Embedded Content

    4 topics
    • Audio & Video Elements
    • Iframes & Embeds
    • Canvas & SVG Basics
    • Responsive Images & srcset

Frontend Web Development HTML & Document Structure flashcards — 51 questions with answers

  1. What is the purpose of the <!DOCTYPE html> declaration in an HTML document?

    It tells the browser to render the page in standards (no-quirks) mode using the current HTML5 specification. It must be the very first line, before the <html> element, and is not an HTML tag itself.

  2. What are the three essential structural elements every HTML5 document must contain, in order?

    <html> (the root element), <head> (metadata), and <body> (visible content). The <html> element wraps the whole document and should carry a lang attribute.

  3. What is the difference between an HTML element and a tag?

    A tag is the markup token in angle brackets (e.g., <p> or </p>); an element is the complete unit consisting of the start tag, content, and end tag. Void elements (like <img>) are elements with no closing tag or content.

  4. What is the syntax of an HTML attribute, and where does it appear?

    An attribute is written as name="value" inside the element's start tag, e.g., <a href="page.html">. Attribute names are case-insensitive; boolean attributes (like disabled) need no value.

  5. Which meta tag makes a page responsive on mobile devices, and what is its typical value?

    <meta name="viewport" content="width=device-width, initial-scale=1.0">. It sets the layout viewport width to the device width and the initial zoom to 1.

  6. What does the charset meta tag do and what value is recommended?

    <meta charset="UTF-8"> declares the document's character encoding. UTF-8 is recommended because it covers virtually all characters. It should appear within the first 1024 bytes of the head.

  7. How many heading levels does HTML provide, and what do they represent?

    Six: <h1> through <h6>. <h1> is the highest (most important) rank and <h6> the lowest. They convey document structure and hierarchy, not merely font size.

  8. What is the semantic difference between <strong>/<em> and <b>/<i>?

    <strong> denotes strong importance and <em> denotes stressed emphasis (semantic meaning). <b> and <i> only apply bold/italic styling with no added importance or emphasis.

  9. Which element defines a paragraph, and can it legally contain a <div>?

    <p> defines a paragraph. No: a <p> cannot contain block-level flow content like <div>; the browser will auto-close the paragraph. It may only contain phrasing (inline) content.

  10. What is the required attribute of an anchor (<a>) element that turns it into a hyperlink?

    The href attribute, which specifies the destination URL. Without href, <a> is a placeholder link (not a hyperlink) but can still be a link target via its content.

  11. How do you make a link open in a new browser tab, and what security attribute should accompany it?

    Use target="_blank". Add rel="noopener noreferrer" to prevent the new page from accessing window.opener and to withhold the referrer, mitigating reverse-tabnabbing.

  12. How do you create a link to a specific section within the same page (a fragment/anchor link)?

    Give the target element an id, then link with href="#the-id", e.g., <a href="#section2">. Using href="#top" or href="#" jumps to the top of the page.

  13. What are the two required attributes for an accessible <img> element?

    src (the image source URL) and alt (alternative text describing the image for screen readers and when the image fails to load). Decorative images should use an empty alt="".

  14. What is the purpose of the <picture> element and its <source> children?

    <picture> provides art direction and format/resolution switching: multiple <source> elements offer candidates with media or type conditions, and a fallback <img> is required. The browser picks the first matching <source>.

  15. What do the srcset and sizes attributes on <img> do?

    srcset lists candidate image files with width (w) or density (x) descriptors; sizes tells the browser the image's rendered width at various breakpoints so it can choose the best srcset candidate before layout.

  16. What is the difference between an ordered list, an unordered list, and a description list in HTML?

    <ol> is a numbered/ordered list, <ul> is a bulleted/unordered list (both contain <li> items). <dl> is a description list containing <dt> (term) and <dd> (description) pairs.

  17. In an HTML table, what are the roles of <thead>, <tbody>, and <tfoot>?

    They group table row sections: <thead> for header rows, <tbody> for the main data rows, and <tfoot> for footer/summary rows. This aids semantics, styling, and scrolling behavior.

  18. What is the difference between the <th> and <td> elements, and what does the scope attribute add?

    <th> is a header cell (bold, centered by default) and <td> is a standard data cell. scope="col" or scope="row" on <th> tells assistive tech which cells the header describes.

  19. What do the colspan and rowspan attributes do in a table cell?

    colspan makes a cell span multiple columns horizontally; rowspan makes it span multiple rows vertically. Both take an integer count, e.g., colspan="2".

  20. Name four HTML5 semantic layout elements and their intended roles.

    <header> (introductory/banner content), <nav> (navigation links), <main> (the document's primary unique content, one per page), and <footer> (footer info). Also <aside>, <section>, and <article>.

Show the other 31 HTML & Document Structure flashcards
  1. What is the difference between <section> and <article>?

    <article> is self-contained, independently distributable content (e.g., a blog post or comment). <section> is a thematic grouping of related content, typically with a heading. An article can contain sections and vice versa.

  2. How many <main> elements should a page have, and can it be nested inside <article> or <aside>?

    Only one visible <main> per document. It must not be a descendant of <article>, <aside>, <header>, <footer>, or <nav>.

  3. What is the purpose of the <figure> and <figcaption> elements?

    <figure> groups self-contained content (image, diagram, code, etc.) that is referenced from the main flow; <figcaption> provides an optional caption. The caption must be the first or last child of <figure>.

  4. What does the <time> element do, and what makes it machine-readable?

    <time> marks up dates/times. The datetime attribute holds a machine-readable value (e.g., <time datetime="2026-07-01">July 1</time>), which tools and search engines can parse regardless of the human-readable text.

  5. What is a document outline and why should heading levels not be skipped?

    The document outline is the hierarchical structure implied by heading ranks. Skipping levels (e.g., <h1> to <h3>) breaks the logical hierarchy for assistive technology and SEO; heading levels should increase by one at a time.

  6. How many <h1> elements are recommended per page in modern SEO practice?

    Conventionally one <h1> per page representing the main topic. While HTML permits multiple, a single top-level <h1> gives the clearest outline and is the safest for accessibility and SEO.

  7. What is the role of the <title> element, and where does it appear to users?

    <title> (in <head>) sets the document's name shown in the browser tab, bookmarks, and search-result headlines. It is required and strongly influences SEO and click-through rate.

  8. What does the meta description tag do, and is it a ranking factor?

    <meta name="description" content="..."> supplies a summary often used as the search snippet. It is not a direct ranking factor but influences click-through rate. There is no meta keywords benefit in modern SEO.

  9. What are Open Graph meta tags used for?

    og: meta tags (e.g., og:title, og:description, og:image, og:url) control how a page appears when shared on social platforms like Facebook and LinkedIn, defining the preview card's title, text, and image.

  10. What does a canonical link tag do?

    <link rel="canonical" href="..."> tells search engines the preferred/master URL for duplicate or similar pages, consolidating ranking signals and avoiding duplicate-content dilution.

  11. What is the difference between the action and method attributes of a <form>?

    action is the URL that receives the submitted data; method is the HTTP verb used to send it (GET appends data to the URL as a query string; POST sends it in the request body).

  12. What is the purpose of <fieldset> and <legend>?

    <fieldset> groups related form controls (drawing a border by default), and <legend> gives that group a caption/title. This improves both structure and accessibility for related inputs like radio-button groups.

  13. Which input type is best for email entry, and what does it provide automatically?

    <input type="email">. It offers built-in format validation and, on mobile, an email-optimized keyboard. Add multiple to allow a comma-separated list of addresses.

  14. Name five HTML5 input types beyond text and explain one benefit they share.

    Examples: number, email, url, date, range, color, tel, search, password. They provide semantic meaning, tailored mobile keyboards/pickers, and built-in native validation.

  15. What is the difference between the name and id attributes on a form input?

    name is the key sent to the server with the input's value on submission (required for the data to be submitted). id uniquely identifies the element in the DOM and is used to associate a <label> via for.

  16. What do the placeholder and value attributes do on an input, and how do they differ?

    value is the input's actual (submittable) initial content; placeholder is a greyed-out hint that disappears on typing and is never submitted. Placeholder is not a substitute for a label.

  17. How do you correctly associate a <label> with its form control for accessibility?

    Either wrap the control inside the <label>, or use <label for="inputId"> matching the control's id. This makes clicking the label focus the control and lets screen readers announce it.

  18. When should you use aria-label instead of a <label> element?

    Use aria-label to provide an accessible name when no visible text label exists (e.g., an icon-only search button). A visible <label> is preferred when possible; aria-label overrides it if both are present.

  19. What are the semantic differences between <input type="radio"> and <input type="checkbox">?

    Radio buttons sharing the same name form a mutually exclusive group (only one selectable). Checkboxes are independent on/off toggles; multiple can be checked. Both submit only when checked.

  20. How do you create a dropdown menu, and how do you preselect an option?

    Use <select> containing <option> elements. Add the selected attribute to the <option> you want preselected. <optgroup> can group options under labels; multiple allows multi-select.

  21. What distinguishes <textarea> from <input type="text">, and how is its initial value set?

    <textarea> is a multi-line text control sized by rows and cols attributes. Unlike <input>, its initial value goes between the tags (not in a value attribute), e.g., <textarea>default</textarea>.

  22. What are the three values of a button's type attribute, and what is the default inside a form?

    type="submit" (submits the form), type="reset" (clears it), and type="button" (no default action, for JS). Inside a form the default is submit, which can cause accidental submissions if unspecified.

  23. Which HTML attributes enable native form validation? Name four.

    required (must be filled), pattern (regex the value must match), min/max and step (numeric/date bounds), maxlength/minlength (character limits), and type-based validation (email, url). The browser blocks submission if constraints fail.

  24. What does the novalidate attribute do, and where is it placed?

    Placed on the <form> element, novalidate disables the browser's native constraint validation on submit, letting the form submit even if inputs are invalid (typically to defer to custom JS validation).

  25. What CSS pseudo-classes reflect native form validation state?

    :valid and :invalid match controls that pass or fail their constraints; :required and :optional match by requirement; :in-range and :out-of-range apply to numeric inputs with min/max.

  26. What are the required steps to embed audio with native controls and a fallback?

    Use <audio controls> with one or more <source src="..." type="..."> children for different formats, plus fallback text/content between the tags for unsupported browsers. Attributes include autoplay, loop, and muted.

  27. What key attributes control <video> playback behavior?

    controls (show UI), autoplay (start automatically, usually requires muted), loop (repeat), muted (no sound), poster (placeholder image before play), and preload (none/metadata/auto hint for buffering).

  28. How do you add captions/subtitles to an HTML5 <video>?

    Add a <track> element inside <video> with kind="captions" (or subtitles), src pointing to a WebVTT (.vtt) file, srclang for the language, and label for the menu name. Use default to enable one by default.

  29. What is an <iframe>, and which attribute improves its security?

    An <iframe> embeds another HTML document within the current page (via src). The sandbox attribute restricts the framed content's capabilities (scripts, forms, popups), and allow controls features like camera; loading="lazy" defers offscreen loading.

  30. What is the fundamental rendering difference between <canvas> and <svg>?

    <canvas> is a raster, immediate-mode bitmap drawn pixel-by-pixel via JavaScript (no DOM for shapes; resolution-dependent). <svg> is retained-mode vector graphics where each shape is a DOM element (scalable, styleable with CSS, resolution-independent).

  31. How do you obtain a 2D drawing context on a <canvas>, and what does the canvas need for accessibility?

    In JavaScript: const ctx = canvas.getContext('2d'); then draw with methods like fillRect and beginPath. For accessibility, provide fallback content between the <canvas> tags and/or an appropriate ARIA label, since canvas pixels are invisible to assistive tech.

Frontend Web Development HTML & Document Structure FAQ

What is in the Frontend Web Development HTML & Document Structure syllabus?

Frontend Web Development HTML & Document Structure is split into 4 chapters: HTML Fundamentals, Semantic HTML, Forms & User Input and Multimedia & Embedded Content. Together they contain 19 topics.

How many chapters are in Frontend Web Development HTML & Document Structure?

4 chapters, containing 19 topics. The largest chapter is HTML Fundamentals, with 6 topics.

Are there flashcards for Frontend Web Development HTML & Document Structure?

Yes — a 51-card HTML & Document Structure deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.