What Semantic HTML Means and Why It Matters
Semantic markup is usually explained as good practice without anyone saying what it buys you. There are four concrete benefits and they are all measurable.
HTML is the easiest of these languages to write badly and still have something appear on screen, which is exactly why it is worth learning properly. These tutorials start from what a tag actually is and build up to markup that is readable, accessible and does not fall apart when you add CSS to it.
Semantic markup is usually explained as good practice without anyone saying what it buys you. There are four concrete benefits and they are all measurable.
Four elements give a page a skeleton that assistive technology can navigate. Two of them behave differently depending on where they sit.
Two simple tests settle almost every case. An article should make sense standing alone, and a section should have a heading.
Not every group of links is navigation. Wrapping too many in a nav element dilutes the landmark until it stops being useful for the people who rely on it.
Aside does not mean sidebar and it is not defined by position. Like header and footer, its meaning depends on where in the document it sits.
A table without header cells is a grid of unlabelled values. Two attributes turn it into something a screen reader user can actually read.
A collapsible panel with full keyboard support and correct announcements, in two elements and no script. It has one behaviour worth knowing about.
Modals are notoriously hard to build correctly. The native dialog element provides focus trapping, escape handling and inert background for free.
The specification's own first rule is not to use it. ARIA changes what assistive technology reports without changing behaviour, which is why misuse is harmful.
Semantic HTML tells a browser what your content is. Structured data tells a search engine what it is about, in a vocabulary they have agreed to read.
Focus order follows the source, not the layout. That single fact explains most keyboard problems on otherwise well built pages.
HTML has more meaningful elements than most people use. A handful are genuinely useful and get replaced by a div purely because nobody knows they exist.