🌍 Front-end Web Development · subject

Front-end Web Development HTML Syllabus

The HTML syllabus for Front-end Web Development in full: 2 chapters and 6 topics, every one listed below, plus 51 HTML flashcards with answers.

2Chapters
6Topics
51Flashcards

HTML syllabus: all 2 chapters

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

  1. Basics

    3 topics
    • HTML Syntax
    • HTML Elements
    • HTML Attributes
  2. Advanced

    3 topics
    • Forms and Input
    • Semantic HTML
    • HTML5 APIs

Front-end Web Development HTML flashcards — 51 questions with answers

  1. What is the standard DOCTYPE declaration for an HTML5 document, and what is its purpose?

    `<!DOCTYPE html>`. It must be the first line of the document and tells the browser to render the page in standards mode (rather than quirks mode).

  2. What is the basic skeletal structure of a valid HTML5 document?

    `<!DOCTYPE html>` followed by `<html>` containing a `<head>` (metadata) and a `<body>` (visible content). Example: `<!DOCTYPE html><html><head><title>...</title></head><body>...</body></html>`.

  3. In HTML syntax, what are the three main parts of a typical element?

    An opening tag (e.g. `<p>`), the content, and a closing tag (e.g. `</p>`). Together: `<p>content</p>`.

  4. What is a void (empty) element in HTML? Give three examples.

    A void element has no content and no closing tag — only a start tag. Examples: `<br>`, `<img>`, `<input>`, `<hr>`, `<meta>`, `<link>`.

  5. How do you write a comment in HTML?

    `<!-- this is a comment -->`. Browsers do not render comment content.

  6. What is the correct way to nest HTML elements, and what is improper nesting?

    Elements must be properly nested — closed in the reverse order they were opened. Correct: `<p><strong>text</strong></p>`. Improper (overlapping): `<p><strong>text</p></strong>`.

  7. Are HTML tag names case-sensitive? What is the recommended convention?

    HTML tag names are not case-sensitive (`<P>` equals `<p>`), but the convention is to write them in lowercase.

  8. How do you specify the character encoding of an HTML5 document, and which encoding is recommended?

    With a meta tag in the head: `<meta charset="UTF-8">`. UTF-8 is the recommended/standard encoding.

  9. What is an HTML entity? Give the entities for <, >, &, and a non-breaking space.

    An entity is an escape code for a reserved or special character. `&lt;` = <, `&gt;` = >, `&amp;` = &, `&nbsp;` = non-breaking space.

  10. What is the difference between block-level and inline elements?

    Block-level elements start on a new line and take the full available width (e.g. `<div>`, `<p>`, `<h1>`). Inline elements stay within the text flow and take only as much width as their content (e.g. `<span>`, `<a>`, `<strong>`).

  11. What are the six heading elements in HTML, and what determines their importance?

    `<h1>` through `<h6>`. `<h1>` is the most important/highest level and `<h6>` the least. There should typically be one `<h1>` per page representing the main heading.

  12. Which element creates a hyperlink, and which attribute specifies its destination?

    The anchor element `<a>`, using the `href` attribute. Example: `<a href="https://example.com">Link</a>`.

  13. What is the difference between ordered and unordered lists, and which elements create them?

    An unordered list `<ul>` shows bullet points; an ordered list `<ol>` shows numbers/sequence. Both contain list items `<li>`.

  14. How do you create a description (definition) list in HTML?

    Use `<dl>` (the list), `<dt>` (the term), and `<dd>` (the description). Example: `<dl><dt>HTML</dt><dd>HyperText Markup Language</dd></dl>`.

  15. What elements are used to build an HTML table, including header, body, rows, and cells?

    `<table>` wraps it; `<thead>`, `<tbody>`, `<tfoot>` group sections; `<tr>` is a row; `<th>` is a header cell; `<td>` is a data cell.

  16. What is the difference between the <strong> / <em> elements and <b> / <i>?

    `<strong>` and `<em>` carry semantic meaning (strong importance, emphasis) read by assistive tech. `<b>` and `<i>` are purely presentational (bold/italic) with no added meaning.

  17. What is the purpose of the <span> and <div> elements?

    They are generic containers with no semantic meaning, used for styling/grouping. `<div>` is block-level; `<span>` is inline.

  18. How do you embed an image, and which attributes are required/recommended?

    `<img src="path" alt="description">`. `src` is required (the image source); `alt` provides alternative text for accessibility and when the image fails to load.

  19. What is the syntax of an HTML attribute?

    A name/value pair written in the start tag as `name="value"`. Example: `<a href="page.html">`. Values are usually quoted.

  20. What are global attributes? Name four common ones.

    Attributes that can be applied to any HTML element. Common ones: `id`, `class`, `style`, `title`, `lang`, `data-*`, `hidden`.

Show the other 31 HTML flashcards
  1. What is the difference between the id and class attributes?

    `id` must be unique within the page and identifies a single element. `class` can be shared by many elements for grouping/styling, and an element can have multiple classes.

  2. What are custom data attributes and how are they written and accessed?

    `data-*` attributes store custom data on elements, e.g. `data-user-id="5"`. In JavaScript they are accessed via `element.dataset.userId`.

  3. What does a boolean attribute mean in HTML? Give examples.

    A boolean attribute is true simply by being present; its value is irrelevant. Examples: `disabled`, `checked`, `required`, `readonly`, `selected`.

  4. What does the target="_blank" attribute do on an anchor, and what security attribute should accompany it?

    `target="_blank"` opens the link in a new tab/window. It should be paired with `rel="noopener noreferrer"` to prevent the new page from accessing `window.opener`.

  5. What is the purpose of the alt attribute on images?

    It provides alternative text describing the image for screen readers, search engines, and as a fallback when the image cannot be displayed.

  6. What element wraps form controls, and which two attributes commonly control submission?

    The `<form>` element. The `action` attribute specifies the URL to send data to, and the `method` attribute specifies the HTTP method (`GET` or `POST`).

  7. What is the difference between the GET and POST methods in an HTML form?

    GET appends form data to the URL as a query string (visible, limited length, used for retrieval/idempotent requests). POST sends data in the request body (not in URL, no length limit, used to change server state).

  8. How does the <label> element improve forms, and how is it associated with an input?

    It provides an accessible caption and expands the clickable area. Associate it by matching the label's `for` attribute to the input's `id`, or by wrapping the input inside the label.

  9. List five common values of the type attribute on an <input> element and what each does.

    `text` (single-line text), `password` (masked text), `email` (email with validation), `number` (numeric input), `checkbox` (toggle), `radio` (mutually exclusive choice), `date`, `file`, `submit`, `hidden`.

  10. What is the difference between radio buttons and checkboxes, and how are radios grouped?

    Checkboxes allow multiple independent selections; radio buttons allow only one choice within a group. Radios are grouped by sharing the same `name` attribute.

  11. Which element creates a multi-line text input, and which creates a dropdown selection list?

    `<textarea>` creates a multi-line text input. `<select>` with nested `<option>` elements creates a dropdown list.

  12. What does the placeholder attribute do, and why should it not replace a label?

    It shows hint text inside an empty field that disappears on input. It is not a substitute for a `<label>` because it vanishes when typing and is poorly handled by assistive technologies.

  13. What does the required attribute do on a form input?

    It marks the field as mandatory; the browser blocks form submission and shows a validation message if the field is left empty.

  14. What is the role of the name attribute on form controls?

    It is the key under which the control's value is submitted to the server (key/value pairs). Controls without a `name` are not submitted.

  15. What attributes constrain numeric/range inputs for validation?

    `min`, `max`, and `step` constrain the value range and increments; `pattern` constrains text against a regular expression; `maxlength`/`minlength` constrain text length.

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

    `<fieldset>` groups related form controls together (often with a border), and `<legend>` provides a caption/title for that group, improving organization and accessibility.

  17. What is semantic HTML, and why is it important?

    Semantic HTML uses elements that convey the meaning/role of their content (e.g. `<nav>`, `<article>`) rather than generic containers. It improves accessibility, SEO, maintainability, and machine readability.

  18. Name the main HTML5 semantic sectioning/structural elements.

    `<header>`, `<nav>`, `<main>`, `<section>`, `<article>`, `<aside>`, `<footer>`, and `<figure>`/`<figcaption>`.

  19. What is the difference between <article> and <section>?

    `<article>` is a self-contained, independently distributable piece of content (e.g. a blog post, comment). `<section>` is a thematic grouping of content, typically with a heading, that is part of a larger whole.

  20. What is the purpose of the <main> element, and how many should a page have?

    `<main>` contains the dominant, unique content of the document. There should be only one visible `<main>` per page, and it should not be nested inside `<article>`, `<aside>`, `<header>`, `<footer>`, or `<nav>`.

  21. What is the <nav> element used for, and should every group of links be wrapped in it?

    `<nav>` marks a section of major navigation links (e.g. main menu, table of contents). Not every set of links needs it — it's reserved for primary navigation blocks.

  22. What is the difference between <header> and the <head> element?

    `<head>` is document metadata (title, meta, links) not displayed in the page body. `<header>` is a visible introductory section of a page or sectioning element, often containing logos, headings, and intro nav.

  23. When should you use the <aside> element?

    For content tangentially related to the surrounding content, such as sidebars, pull quotes, related links, or advertisements.

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

    `<figure>` groups self-contained media (images, diagrams, code) referenced from the main content, and `<figcaption>` provides a caption for that figure.

  25. What is the role of ARIA in HTML, and what is the first rule of ARIA?

    ARIA (Accessible Rich Internet Applications) adds roles/states/properties to improve accessibility for assistive tech. The first rule: if a native HTML element with the needed semantics exists, use it instead of adding ARIA.

  26. What is the Geolocation API and which method retrieves the user's position?

    An HTML5 API to access the device's geographic location. `navigator.geolocation.getCurrentPosition(success, error)` retrieves the current position (requires user permission).

  27. What is the difference between localStorage and sessionStorage in the Web Storage API?

    Both store key/value string pairs per origin. `localStorage` persists with no expiration (survives browser restarts); `sessionStorage` lasts only for the duration of the page session (cleared when the tab closes).

  28. What is the <canvas> element, and how do you obtain a 2D drawing context?

    `<canvas>` is a bitmap drawing surface scriptable with JavaScript. Get its 2D context with `canvas.getContext("2d")`, then draw with methods like `fillRect()` and `arc()`.

  29. What is the purpose of the HTML5 <video> and <audio> elements, and how do you supply fallbacks/formats?

    They embed native video/audio playback without plugins. Multiple `<source>` children provide alternative file formats so the browser picks one it supports; text between the tags is fallback content.

  30. Name three HTML5 JavaScript APIs (besides storage) introduced to enrich web apps.

    Examples: Geolocation API, Web Storage API, Canvas API, Drag and Drop API, Web Workers, History API (`pushState`), WebSockets, and the Fetch API.

  31. What is the difference between the <progress> and <meter> elements?

    `<progress>` represents the completion progress of a task (e.g. a download). `<meter>` represents a scalar measurement within a known range (a gauge), such as disk usage or a score.

Front-end Web Development HTML FAQ

What is in the Front-end Web Development HTML syllabus?

Front-end Web Development HTML is split into 2 chapters: Basics and Advanced. Together they contain 6 topics.

How many chapters are in Front-end Web Development HTML?

2 chapters, containing 6 topics. The largest chapter is Basics, with 3 topics.

Are there flashcards for Front-end Web Development HTML?

Yes — a 51-card HTML 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.