What Is Semantic HTML?
Semantic HTML, also known as semantic markup, refers to the use of HTML tags that convey the meaning—or semantics—of the content contained within them.
By adding semantic HTML tags to your pages, you provide additional information that helps define the roles and relative importance of the different parts of your page.
(As opposed to non-semantic HTML, which uses tags that don’t directly convey meaning.)
![what is semantic html](https://static.semrush.com/blog/uploads/media/cc/85/cc85d452a743e27f68d426df35e4da7d/EN-Semantic-Search-Non-Semantic.png)
Note: HTML is a language that is used to structure a website. This guide assumes a basic understanding of HTML. If you’re a total beginner, looking at an HTML introduction guide will be helpful.
What Are Semantic HTML Tags?
Semantic HTML tags are tags that define the meaning of the content they contain.
For example, tags like <header>, <article>, and <footer> are semantic HTML tags. They clearly indicate the role of the content they contain.
On the other hand, tags like <div> and <span> are typical examples of non-semantic HTML elements. They serve only as content holders but give no indication as to what type of content they contain or what role that content plays on the page.
Why Do I Need to Use Semantic HTML Tags?
Besides the obvious reason that semantic HTML tags are easier to read and understand—for example, by web developers reviewing the code—there are two more specific reasons why you should always use semantic tags.
Accessibility
For sighted users, it’s easy to identify the various parts of a webpage. Headers, footers, and the main content are all immediately visually apparent.
However, it is not that easy for users who are blind or visually impaired and rely on screen readers.
The proper use of HTML semantic tags will allow these readers to understand your content better because their screen readers will communicate your content more accurately.
SEO
Semantic HTML tags are important for SEO (search engine optimization) because they indicate the role of the content within the tags.
That information gives search engine crawlers, like Googlebot, a better understanding of your content. This increases the chances that your content will be selected as a candidate for ranking on the search engine results page (SERP) for relevant keywords.
To put it simply, pages with correctly implemented semantic HTML have an advantage in SEO over those that don’t.
You can use a tool like Site Audit to find HTML tag issues that may be affecting your SEO.
(Create a free trial account now to follow along and see what issues you’ll find.)
Enter your domain into the tool and configure your crawl settings.
![enter your domain in Site Audit tool](https://static.semrush.com/blog/uploads/media/b4/f9/b4f9eaa70d8e7822b5aaa4299ac3e9f2/GjNQTmjaxzQwtL1idVyZCseLTm5oaPpuVdAophQfZ8XHIUMeIEEKKFuwgbj85spQ1i8oPDKrCcwGQ-KGLYfkyj3qRvtwSI7S13hu8gJImPbAWU8WKvz3jbu8knF64NRz6htw9IyzY94ulheqWwrAAmE.png)
Go to the “Issues” tab.
!["Issues" tab in the Site Audit tool](https://static.semrush.com/blog/uploads/media/2d/a3/2da3cfc82be5065a03a7583651a3d5ab/IvQv33iGhLzmPtJmuIYQ_EyFKNrvVl-In-IHrsUYFGChGH2TUymAlApOzX0Ts0BaXK3vdhlORlXWLoBJSh-dxgA-EAUGokaoWP_uXc7AE7XYRqrPwxSiBeD6gJBTkzTPL8yr5B2rCMSSy2Ef9Kf4W7Y.png)
And search “tag” in the “Search by check” box.
![search “tag” in the “Search by check” box in the Site Audit tool](https://static.semrush.com/blog/uploads/media/71/5d/715d6b593c127a5108b66c00fe21b2ab/M-xnXoaK_h3zS-sn3EOWLsxYm9raFZt2XGGOTLiMmMb0yLw9gjgu729EVdFFbWM8en3Tap81aWAti8T0dulIdrjcJHjT9S1ml_M-BztTpUen2Os6-ars5dGaZhzFAxNTUWKSjenll1JTUo_2WuybX68.png)
Click on “Why and how to fix it” to learn more about each site issue.
![an example of “Why and how to fix it” section in the Site Audit tool](https://static.semrush.com/blog/uploads/media/f2/cf/f2cfe7b710c0af329ee0d6c6de4caae0/bIt_QlzolYKA5QkXJN8yS07wP0D1lKh_UNDJxttZOEpb6LOnD31zFM2AjtYBS-Yf45uZ_sm5WXDHupFR5pnCr6SxenMdIMUqQPCRyy7NGojNwzJtSxmUNkxlj9SqYJOJbjTZAE_aOKBRkfOxQ8PZHow.png)
Types of HTML Semantic Tags
Semantic tags can define different parts of a webpage.
Let's take a look at the most common semantic HTML elements, divided into two categories based on their usage:
HTML Semantic Tags for Structure
Many semantic HTML tags communicate the layout of a page.
These “structural” tags were introduced when HTML4 got upgraded to HTML5. That's why they're also commonly known as semantic HTML5 tags or semantic HTML5 elements.
![semantic html elements](https://static.semrush.com/blog/uploads/media/9f/f4/9ff4decb66abd1d1b2bfff1afbca5a68/Semantic-html.png)
Here’s a full list:
- <header>: The header tag defines content that should be considered the introductory information of a page or section
- <nav>: The navigation tag is used for navigation links. It can be nested within the <header> tag, but secondary navigation <nav> tags are also commonly used elsewhere on the page.
- <main>: This tag contains the main content (also called the body) of a page. There should be only one tag per page.
- <article>: The article tag defines content that could stand independently of the page or site it’s on. It does not necessarily mean a “blog post.” Think of it more as “an article of clothing”—a self-contained item that can be used in various contexts.
- <section>: Using <section> is a way of grouping nearby content of a similar theme. A section tag differs from an article tag. It isn’t necessarily self-contained, but it forms part of something else.
- <aside>: An aside element defines content that’s less important. It’s often used for sidebars—areas that add complementary but nonessential information.
- <footer>: You use <footer> at the bottom of a page. It usually includes contact information, copyright information, and some site navigation.
HTML Semantic Tags for Text
The semantic HTML tags for text are HTML tags that—besides the formatting—also convey the semantic function of the text they contain.
Here are some of the most common examples:
- <h1> (heading): The H1 tag marks the top level heading. There’s usually only one H1 heading per page.
- <h2> to <h6> (subheadings): The subheadings of various levels of importance. There can be multiple headings of the same level on a single page.
- <p> (paragraph): A standalone paragraph of text.
- <a> (anchor): Used to mark up a hyperlink from one page to another.
- <ol> (ordered list): A list of items that are displayed in a particular order, starting with bullet points. One <li> (list item) tag contains a single item in the list.
- <ul> (unordered list): A list of items that do not need to be displayed in a particular order, starting with ordinal numbers. One <li> (list item) tag contains a single item of the list.
- <q> / <blockquote>: A quotation of the text. Use <blockquote> for long, multi-line quotations and <q> for shorter, inline quotations.
- <em> (emphasis): Used for text that should be emphasized.
- <strong> (strong emphasis): Used for text that should be strongly emphasized.
- <code>: A block of computer code.
Note: We’ve only listed some of the most common semantic HTML tags. You can use many others—like <summary>, <time>, <address>, <video>, etc.—to make the content of your website easier to understand. To discover more HTML semantic elements, check out the list of all HTML tags by W3Schools.
Semantic HTML Tips & Best Practices
Finally, let’s cover some HTML implementation tips based on common mistakes people make when using semantic HTML tags.
Don't Use Semantic HTML Tags for Styling
Although web browsers apply styling to many semantic tags (e.g., the text within an <a> tag is usually blue and underlined), it doesn’t mean HTML tags are supposed to be used to style your text.
In other words, just as you wouldn’t use an <a> tag for a “non-link” text just to make it blue and underlined, you should not use other semantic tags for purely stylistic purposes.
Here are some typical examples of using semantic tags incorrectly:
- Using an <h1> to <h6> tag for text that is not a heading with the purpose of changing its font size
- Using <blockquote> just to indent text that is not a quotation
- Using <strong> or <em> just to add bold or italics to text that doesn't need emphasis.
For styling purposes, always use CSS.
Nest the Heading Tags with Semantics in Mind
Always order header elements by importance.
For example, all the H3 headings that follow a certain H2 heading should be subtopics of that H2.
![order header elements by importance](https://static.semrush.com/blog/uploads/media/f7/c1/f7c15591e37e1408d96d4c71e1057130/On-Page-SEO.png)
This way, the structure of headings creates a logical hierarchy of the topics within your piece of content and helps both readers and search engines better understand and navigate the text.
Tip: Use Semrush’s Site Audit tool to identify issues with H1 headings, other HTML, and on-page SEO errors your site might suffer from.
The same advice—nesting tags by their meaning—applies to all the other semantic HTML tags.
Which brings us to the next piece of advice:
Don’t Just Copy Your Visual Layout
Your HTML implementation shouldn’t be a mere duplicate of the visual layout. Instead, it should follow the semantic structure of the page.
Let’s take a look at this example:
![semantic layout](https://static.semrush.com/blog/uploads/media/50/8a/508a71abc9920d7feac64df8943be11b/Semantic-Layout.png)
The usage of HTML tags on the left side is incorrect because it indicates that the page contains four different topics, rather than one topic and three subtopics, as shown on the right.
On the right-hand side, we have a properly constructed page using semantic HTML. Although there are four separate sections in the visual layout of the page, the HTML tags are nested according to the semantics of the content.