We use essential cookies to keep this website working. With your permission, we may also use analytics, preference, and marketing cookies to improve the site. You can accept all, reject non-essential cookies, or choose settings. See our Cookie Policy.
170 companion flashcards ·
AI-assisted study content ·
Open the deck →
a foundation in web development. It covers the building blocks of HTML5 — like semantic elements, form inputs, and accessibility attributes — alongside the core concepts of CSS, including selectors, pseudo-classes, pseudo-elements, and specificity. Together, these are the everyday tools you'll reach for when structuring and styling a webpage.
It's well suited for beginners who are just getting comfortable with markup and styling, as well as anyone returning to the basics who wants to refresh their understanding of how HTML and CSS work together. If you're working through a web development course or building your first projects, these flashcards can help reinforce the concepts you'll see most often in code and documentation.
To get the most out of the deck, try reviewing a small set of cards each day rather than cramming everything at once — spaced repetition works best when your brain has time to rest between sessions. As you go through each card, take a moment to think about how you'd apply the concept in a real HTML file or stylesheet, since these topics are deeply hands-on. When you encounter a question about something like specificity or semantic elements, try writing a tiny example right after reviewing it to lock the idea into memory.
Foundations of HTML Document Structure
Every HTML5 page begins with a doctype declaration, written as `` on the very first line. This single line tells the browser to render the document in standards mode, following the HTML5 specification. Without it, browsers fall back to quirks mode, emulating legacy behaviors that break modern CSS layouts and box-model handling. A minimal valid document then declares a language with the `lang` attribute on the `` element, sets the character encoding via a `` tag (typically UTF-8, which supports virtually every written language and emoji), and provides a `
` inside the ``. The charset declaration must appear within the first 1024 bytes so the browser can correctly decode the page without re-parsing.
The `
` element is often confused with the visible `` element, but they serve very different purposes. The `` holds metadata about the document, including title, character set, viewport settings, linked stylesheets, scripts, and Open Graph tags, and is never rendered as visible content. The ``, by contrast, is a semantic landmark that represents introductory content for its nearest sectioning ancestor, such as a page banner with a logo and main navigation. A page may contain many `` elements (for example, one inside each ``), but only one ``. Other useful head-only elements include `` for setting a default base URL for relative links, `` for declaring the master URL when the same content is reachable via multiple addresses, which helps consolidate SEO ranking signals, and `` for setting the color of the browser chrome on supporting devices.
HTML5 semantic elements describe the role of their content rather than just its appearance, providing meaningful structure that improves accessibility, SEO, and code readability. Common landmarks include `` for introductory content, `