HTML

Every page you open in a browser, from a search engine's home page to a single-page app built with a large framework, arrives as HTML or is turned into HTML before it reaches the screen. HTML (HyperText Markup Language) describes what each piece of content is: a heading, a paragraph, a link, a form field, a video. CSS (Bootstrap to Tailwind CSS) decides how it looks, and JavaScript (JavaScript to Web APIs) decides how it behaves, but both work on the element tree that HTML defines.

HTML is also the most forgiving language you will write. A browser never refuses a page because of a missing end tag; it repairs the markup by rules written into the standard and renders something. That tolerance kept the web running for over thirty years, and it is a trap: a page can look right in your browser while screen readers, search engines and other browsers see a broken structure. This chapter teaches you to write markup that is correct by the standard, not just markup that happens to render.

The language keeps growing. Modal dialogs, popovers, accordions, lazy-loaded images and reusable components once needed JavaScript libraries; now they are built into HTML and supported by every major browser.

What you will learn:

Sections