← HTML/CSS EnglishChapter 04 of 13

Semantic HTML

## Learning Objectives - Understand semantic vs non-semantic HTML - Use semantic elements correctly - Improve accessibility and SEO ## What is Semantic HTML? Semantic HTML uses elements that describe their meaning to both browsers and developers. ```html
...
...
...
...
``` ## Document Structure Elements ### header Represents introductory content or a group of navigational aids: ```html

Site Title

``` ### nav Defines navigation links: ```html ``` ### main The dominant content of the document: ```html

Welcome to Our Site

This is the main content area.

``` ### article Self-contained, independently distributable content: ```html

Blog Post Title

Published on

Article content goes here...

``` ### section Thematic grouping of content: ```html

Features

Our product has many features...

``` ### aside Content tangentially related to surrounding content: ```html ``` ### footer Footer for a section or page: ```html ``` ## Text-Level Semantics ### time Represents a date or time: ```html

Event on

``` ### mark Highlighted/marked text: ```html

The highlighted term is important.

``` ### address Contact information: ```html
Written by Author Name.
Visit us at: 123 Main St, City
``` ### figure and figcaption Self-contained content with a caption: ```html
Sales chart
Figure 1: Q1 2026 Sales Results
``` ## Comparison: div vs semantic elements ### When to use div Generic container when no semantic element fits: ```html

Warning: This action cannot be undone.

``` ### When to use semantic elements ```html

Article Title

Article content...

``` ## Benefits of Semantic HTML ### Accessibility Screen readers can navigate by landmarks: ```html ``` ### SEO Search engines understand content structure: ```html

Keyword-Rich Title

Related Content

``` ### Maintainability Code is self-documenting: ```html
...
...
...
``` ## Complete Page Example ```html Semantic Page Example

My Blog

Understanding Semantic HTML

Published on

Semantic HTML improves accessibility and SEO...

Key Benefits

  • Better accessibility
  • Improved SEO
  • Cleaner code

© 2026 My Blog. All rights reserved.

``` ## Summary - Semantic elements describe their meaning (`
`, `

Comments

Comments powered by Giscus

To enable comments, add your Giscus embed code here.

Learn more about Giscus →