🌍 Frontend Web Development · flashcards

Frontend Web Development HTML & Document Structure Flashcards

51 question-and-answer cards covering HTML & Document Structure as it is examined in Frontend Web Development. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

51Cards in deck
24Free preview
19Syllabus topics
~202Chars per answer
FreePrice

24 sample cards from the HTML & Document Structure deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. 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.

  2. 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.

  3. 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.

  4. 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).

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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>.

  15. 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.

  16. 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.

  17. 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).

  18. 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.

  19. 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.

  20. 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).

  21. 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.

  22. 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.

  23. 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).

  24. 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.

What this deck covers

The HTML & Document Structure deck follows the Frontend Web Development HTML & Document Structure syllabus — 4 chapters and 19 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 12.8 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 202 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

HTML & Document Structure flashcards FAQ

How many HTML & Document Structure flashcards are in this Frontend Web Development deck?

51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Frontend Web Development flashcards free?

Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.

What do the HTML & Document Structure cards cover?

They follow the Frontend Web Development HTML & Document Structure syllabus — 4 chapters and 19 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.