The Role of Semantic HTML
Learn why semantic elements like <nav>, <main>, and <header> are essential for screen readers and accessible navigation.
The problem with div soup
Open any modern website in DevTools and you will often find hundreds of
Imagine walking into a large building where none of the rooms have signs. No "Exit" signs, no "Restroom" labels, no room numbers, no directory in the lobby. You could eventually figure out where things are by wandering around and looking, but it would take far longer and be far more frustrating. Now imagine navigating that building blindfolded. Without those signs, it would be nearly impossible. That is what a screen reader user experiences on a page built entirely from divs — there are no landmarks, no signposts, and no structure to navigate by.
Semantic HTML elements solve this problem. Elements like
When a screen reader encounters a