Semantic elements in HTML are elements that explicitly describe what they mean in a human-readable format. These features provide better structure and understanding of web pages, helping developers and browsers better understand content. Semantics makes HTML code easier to maintain and navigate and improves accessibility and
SEO (Search Engine Optimization).
Examples of semantic Elements
<header> It represents the preamble or navigation link container. There are usually nicknames, logos, and other identifying features.
<footer> Define the footer for the document or section. This usually includes information about the author, copyright information, and links to relevant documents.
<main> Represents the main text of the document <body>. The document contains only one <main> element.
<main>
<h1>Welcome to My Website</h1>
<p>Here is the main content of the page.</p>
</main>
<figure> and <figcaption> The <figure> element represents self-contained objects, such as figures, diagrams, diagrams, code listings, etc., and the
<figcaption> element represents text that written for <figure>
<figure>
<img src="image.jpg" alt="An example image">
<figcaption>An example image with a caption</figcaption>
</figure>
The use of semantic features improves the clarity and readability of an HTML document, making it easier for developers and devices (such as search engines and assistive technologies) to parse and understand its content
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Semantic Elements in HTML
Semantic elements in HTML are elements that explicitly describe what they mean in a human-readable format. These features provide better structure and understanding of web pages, helping developers and browsers better understand content. Semantics makes HTML code easier to maintain and navigate and improves accessibility and SEO (Search Engine Optimization).
Examples of semantic Elements
<header> It represents the preamble or navigation link container. There are usually nicknames, logos, and other identifying features.
<nav> It defines the set of navigation links.
<section> Represents an independent section with no specific semantic element to represent it.
<article> It represents self-contained content that can be distributed independently from the rest of the web page or site.
<aside> It has stories that are tangentially related to the surrounding stories. They are often used in parts.
<footer> Define the footer for the document or section. This usually includes information about the author, copyright information, and links to relevant documents.
<main> Represents the main text of the document
<body>. The document contains only one <main> element.<figure> and <figcaption> The
<figure> element represents self-contained objects, such as figures, diagrams, diagrams, code listings, etc., and the<figcaption>element represents text that written for<figure>The use of semantic features improves the clarity and readability of an HTML document, making it easier for developers and devices (such as search engines and assistive technologies) to parse and understand its content