ASWCode Tutorials

Learn Web Development - From Basics to Advanced

HTML Semantic Elements

Semantic elements give meaning to your HTML content. They help search engines and screen readers understand your page better.

<article> - Article Content

Represents a standalone piece of content like a blog post:

My First Blog Post

This is a simple article example.

<aside> - Sidebar

Used for side content related to the main content:

<details> <summary> - Collapsible Content

Used to hide and show extra information:

Click to see more info

This is the hidden content revealed when clicked.

<figure> <figcaption> - Image & Caption

Used for images, diagrams, or illustrations:

Example Semantic Element Image
This is an example caption.

<header> <footer>

Defines the beginning and end of a page or section:

Header Section

Footer Section

<main> - Main Content

Only one <main> element per page:

This is the main content of the page.

<mark> - Highlight Text

Use to highlight important text:

This is important text highlighted.

<nav> - Navigation Links

Used for navigation menus:

<section> - Section of Content

Used for grouping related content:

Section Title

Content inside this section.

<time> - Date and Time

Used to show readable and machine-friendly dates:

Published on:

Next Lesson → HTML Entities

Previous Lesson → HTML Computer Code Elements

← Back