Beginner Topic 4 of 51 Web Development
Semantic HTML
Using tags that convey meaning such as header and article.
How it works
Semantic HTML uses elements that convey meaning rather than just appearance: header, nav, main, article, section, aside, footer, figure, time, button and headings in logical order. These give structure to browsers, search engines, assistive technologies and developers, enabling features like reader mode and landmark navigation. A button is naturally focusable and keyboard-operable, unlike a clickable div.
Step-by-step walkthrough
- Use tags that describe meaning, not only appearance.
- header holds the page intro.
- nav holds navigation links.
- main holds the unique content with article and section.
- footer closes the page, and screen readers and search engines benefit.
Where it is used
Accessible, SEO-friendly sites and maintainable layouts use semantic markup. Screen reader users jump between landmarks and headings to navigate pages quickly.
Common pitfall
Div soup, with generic divs and spans everywhere, loses meaning and requires extra ARIA and scripting to be accessible. Using headings for size instead of hierarchy breaks outlines. Misusing elements, such as tables for layout, causes problems. Choose the element by its meaning and style it with CSS.
Where it fits in the course
Semantic HTML is topic 4 of 51 in Web Development, rated Beginner. It follows HTML Forms. The next topic is CSS Basics.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Web Development quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Web Development quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Semantic HTML?
Where do people use Semantic HTML?
What is the most common mistake with Semantic HTML?
What should I learn before this topic?
How can I practice it?
Is Semantic HTML hard to learn?
How long does it take to learn Semantic HTML?
Which topics are related to Semantic HTML?
What should I study after Semantic HTML?
Related topics
- HTML Forms (Web Development)
- CSS Basics (Web Development)
- HTML Basics (Web Development)
- CSS Selectors (Web Development)
- Semantic Analysis (Languages & Compilers)
- Semantic Versioning (DevOps & Tooling)
- Ontologies and Semantic Web (Emerging & Frontier Topics)