Understanding Semantic HTML
By John Doe
<article>: This entire white box is an article element.
It contains self-contained content that could be distributed independently.
What are Semantic Elements?
Semantic elements clearly describe their meaning to both the browser and developer. Elements like <header>, <nav>, <main>, <article>, <section>, and <footer> are much more descriptive than generic <div> elements.
<section>: This blue-bordered area is a section element.
It groups related content under a heading.
Benefits of Semantic HTML
- Accessibility: Screen readers can better understand page structure
- SEO: Search engines can better index your content
- Maintainability: Code is easier to read and understand
- Future-proof: Follows web standards and best practices
<figure> & <figcaption>: The image above is wrapped in a figure element
with a figcaption providing a description.