# Use semantic HTML elements > HTML5 Semantic Elements are used appropriately (header, section, footer, main, article, aside...). **Priority:** high · **Difficulty:** beginner · **Time:** 15 min --- HTML5 semantic elements provide meaningful structure to web content, improving accessibility, SEO, and code maintainability. ## Code Example ```html Semantic HTML Example

Site Title

Article Title

Section Heading

Content goes here...

``` ## Why It Matters Screen readers use semantic elements to navigate pages—users can jump directly to <main> content or <nav>. Search engines also use semantics to understand content hierarchy. ## Semantic Elements Reference # ## Document Structure ```html

Site Logo

``` ### Content Grouping ```html

Blog Post Title

Post content...

Products

Product listings...
``` ## Framework Examples ### Next.js with Semantic Structure ```jsx // components/Layout.js return (

My Website

{children}
) } // pages/blog/[slug].js return (

{post.title}

By {post.author.name}
) } ``` ### React Component Structure ```jsx // BlogLayout.jsx function BlogLayout({ children }) { return (

My Blog

{children}
) } // ArticleCard.jsx function ArticleCard({ article }) { return (

{article.title}

{article.excerpt}

) } ``` ### Vue.js Semantic Templates ```vue ``` ## Complex Content Structures ### E-commerce Product Page ```html

Product Name

$99.99

Product photo
Main product image

Description

Product description...

Customer Reviews

Great product!

★★★★★

Review content...

By John Doe
``` ### News Website Structure ```html

Breaking News

Major News Story

Story summary...

Latest News

``` ## Accessibility Benefits ### Screen Reader Navigation ```html
``` ### Heading Hierarchy ```html

Main Article Title

Section Title

Subsection Title

Content...

Another Subsection

More content...

Another Section

Section content...

``` ## SEO Benefits ### Rich Snippets Support ```html

Article Title

Article content...

``` ## Common Anti-Patterns ### ❌ Div Soup (Non-semantic) ```html
Site Title
Article Title
Content...
``` ### ✅ Semantic Alternative ```html

Site Title

Article Title

Content...

``` ## Tools & Validation - **HTML5 Outliner**: Visualize document structure - **WAVE**: Check semantic structure accessibility - **axe DevTools**: Accessibility testing including landmarks - **Lighthouse**: SEO and accessibility audit - **W3C Markup Validator**: Validate HTML5 semantic usage ## Browser Support All modern browsers fully support HTML5 semantic elements. For older browsers (IE8 and below), you can use the HTML5 shiv: ```html ``` ## Verification ### Automated Checks - Inspect the final rendered HTML in the browser or page source to confirm the rule is satisfied. - Validate the affected markup with browser tooling or an HTML validator where appropriate. - Test one representative route or template that uses the pattern. - Re-check shared components that emit the same markup so the fix is consistent. ### Manual Checks - Verify the rendered browser behavior manually on representative routes and supported browsers so the user-facing outcome matches the rule.