Chapter 2 of 10All chapters
Chapter 2 of 10
HTML
Structure and meaning.
Elements carry meaning
Headings, lists, links, buttons and form fields tell the browser what content is, which drives keyboard behaviour, screen reader output and search engines.
- One h1 per page, then headings in order without skipping levels.
- A link goes somewhere; a button does something. Do not swap them.
Forms
Label every field, use the right input type so mobile keyboards adapt, and let the browser validate what it can. A form that works without JavaScript is more robust than one that does not.