To understand what an HTML tag is, let’s start by defining what HTML is.
HTML stands for HyperText Markup Language, a computer language used to create web pages.
Unlike programming languages (such as Java, C++) or scripting languages (such as Javascript, PHP, Python), HTML is a markup language. It is used to structure the appearance and style of a web page.
Each element of the page (titles, images, text…) is framed by tags to apply a specific formatting.
HTML tags are therefore bits of code used to indicate the behavior and style of the content they enclose.
Also known as tags, they (almost) always work in pairs. An opening tag ” <>”is placed at the beginning of the element and a closing tag “</>” at the end of the element.
Exemple : <p>Le code et les balises HTML pour les nuls.</p>
Note that some tags, such as the image tag, are self-closing.
Exemple : <img src="www.url-de-l-image.fr"</a>
Finally, some HTML tags can be supplemented by attributes; additional values that adjust the behavior of the element. Examples include the <a> tag and its href attribute, or the <img> tag and its src attribute.
Read: Our complete SEO guide
Do HTML tags have an impact on SEO?
The answer is yes! But not all…
Here at the agency, we distinguish between 2 types of HTML tags:
- Physical markup tags: these are responsible for the style and formatting of elements (bold, italic, font…).
- Logical markup tags: they have a semantic responsibility; in other words, they are read and analyzed by search engines.
If your web page doesn’t contain the right HTML tags, Google won’t be able to understand its structure and content, and so won’t be able to index it correctly.
The more you help Google to “read” your page, the more you’ll improve your SEO ranking.
What are the most important HTML tags for SEO?
There are hundreds of HTML tags used to position and style page elements, but only ten or so are of any importance to your SEO.
Let’s take a look at these markers.
Find out more: 8 SEO optimizations to please Google
HTML meta tags
Meta tags are the information that appears on the search engine results page. Think of them as your shop window, designed to entice people into your store.
The HTML meta <title tag>
The meta tag <title> corresponds to the title of your page displayed in the SERP and used as a clickable link.
This tag is one of the most important for SEO. It must contain your main keyword, while making visitors want to click.
It’s advisable to keep this tag relatively short. Google truncates titles that exceed 600 pixels in width, which equates to **a length of 55-65 characters**.
The HTML tag <meta name= description>
This tag designates the 2-3 lines of text displayed below the <title> tag in search engines.
Even if it’s advisable to insert your keyword (to let the user know that the page answers his query), this has little impact on the SEO of your web page.
The main purpose of this HTML tag is to contribute to your page’s CTR. It’s there to convince Internet users to click on your link rather than your competitor’s.
The length of text displayed in Google varies. It can be up to 300 characters, but usually only the first 160 characters are shown.
It’s also possible that Google won’t use your meta-description tag if it deems it irrelevant to the query in question. It will then display an extract from your page instead.
HTML tags <Hn>
Beacons <h1> à <h6> are used to prioritize the titles of your web page.
The <H1 HTML tag>
The <H1> tag corresponds to the main title of your page – not to be confused with the <title> tag, which is only displayed in the SERP.
From an SEO point of view, the <Hn> tag is the most important. In fact, it’s mandatory. You absolutely must have one on each of your web pages. Google gives it a lot of weight, so make sure it contains your main keyword.
In marketing terms, it’s the first thing visitors will see on your page. Its content must therefore be eye-catching and capture the reader’s attention, encouraging them to read on.
Other HTML tags <Hn>
The <H2> to < H6 > tags correspond to your page’s subheadings. Note that there is no 7ᵉ level title.
After reading the <H1> tag, the majority of readers will skim the page, scrolling quickly to assess its content and decide whether further reading is worthwhile.
Your Hn tags should therefore clearly indicate the content of each section (as in this article, for example).
They help to structure and break up your page. The more pleasant your page is to read, the more time your readers will spend there, and the more Google will consider it a quality web page that deserves to be well referenced.
Try to include your main or secondary keywords in your <H2> and <H3> tags. The rest of the <Hn> tags are less important for SEO.
Finally, make sure to respect the order of these HTML tags. Don’t add a <H4> title before a <H3> title, for example.
Learn more: 9 tips to optimize your WordPress content for better SEO
The HTML tag <hr>
The <hr> tag automatically creates a horizontal line on your page.
Whereas in previous versions of HTML, this tag had only a visual function, the new version gives it a semantic function.
Search engines now use them to analyze page structure and understand the content of each sub-section.
Use this tag to indicate to search engines the end of one section and the beginning of another.
HTML tags <b> or <strong>
These 2 tags have the same visual function: they define bold text.
However, they are interpreted differently by search engines.
The < b > tag has only a physical markup function. It is used to highlight an area of text, without emphasizing its importance.
The <strong tag>, in addition to making the text bold, helps to identify text of particular value. It is taken into account by search engines and plays a role (albeit a relative one) in page indexing.
HTML tags <i> or <em>
These 2 tags define italicized text. Like the previous tags, they do not have the same SEO weight.
The < i > tag also only has a physical markup function. The italicized text zone differs visually, but is not perceived as more important by search engines.
The <em> tag produces the same result on screen, but search engines give it a certain semantic value.
The <alt HTML attribute>
The <alt>or alternative text, is one of the attributes used in HTML image tags. <img>.
This is a short text (100 characters maximum) that is displayed in place of images when they fail to appear on the screen, and is read to visually impaired people by screen readers.
This HTML tag is also interpreted by search engine robots to understand the image content. It is therefore advisable to insert a keyword in order to :
- reinforce semantic understanding of the page
- contribute to image referencing on Google Images
To find out more, read our article: How to optimize your images for better SEO?
HTML tags <ol> or <ul>
These tags are used to create bulleted lists:
- an unordered list with tags <ul>
- a numbered list of tags <ol>
These two types of tags must be framed by opening and closing tags <li>…</li>, as shown in the examples below.
<li>
<ul>Élément 1</ul>
<ul>Élément 2</ul>
<ul>Élément 3</ul>
</li>
<li>
1 <ol>Attribut 1</ol>
2 <ol>Attribut 2</ol>
3 <ol>Attribut 3</ol>
<li>
As well as making your text airy and easy to read, these tags are important in SEO, as they can be used by Google to create Featured snippets in position 0.
Position 0 is the block of information located above the 1ʳᵉ natural position in the search engine results page. It provides a direct answer to the surfer’s query, without him having to click on one of the links.
Reaching position 0 is the Holy Grail of SEO, offering you visibility and click-through rates that would otherwise be unattainable.
HTML tags <a> their href attribute
The HTML tag <a> and its href attribute are used to create a hypertext link.
The < a > tags surround the element that will become a clickable link. In the case of a text zone, this is referred to as anchor text.
The href attribute specifies the URL of the destination page.
These HTML tags can be used to create links to a document, an e-mail address, a telephone number, and of course to another web page (including a page on your own site).
And that’s where it gets interesting for your SEO. Good internal linking allows you to efficiently distribute the SEO “juice” from the best-referenced web pages to those that aren’t yet.
To optimize the anchor text of your links, make sure it tells Google the keyword on which you want to position the target page.