#HTML tags and attributes everyone should know for SEO
9 HTML tags and 11 attributes everyone should know for SEO
HTML is the foundation of a web page. Learn about the key HTML tags and attributes that are essential for good SEO.
HTML is a markup language that forms the basis of most web pages.
By using HTML elements, SEO professionals can communicate information about the page to users and search bots, which can help clarify the importance, nature, and order of a page's content, as well as its relationship to other web pages.
Keywords
Tags must have the opening <X> and closing </X> elements for the tag to work.
There are also empty elements, like <br>, which have no content or end tags.
Attributes
Attributes are added to the elements to modify them.
They are found in the element, such as:
<link rel = "canonical" href = "https://www.example.com" />
3 basic HTML tags
In order to create a useful web page, a few key tags are needed.
<! DOCTYPE html>
The <! DOCTYPE html> is the very first tag on a web page.
Essentially presents the page as a web page.
<head>
The <head> tag introduces the first section of the page.
<body>
The body tag contains information about the page
Common tags for SEO and the attributes used in it
<meta>
The <meta> tag is found in the <head> of the page.
It can contain attributes that describe information on the web page that will not actually be visible in the content of the page.
This meta tag is often referred to as "metadata" because of the attributes that are used with it that control things like "meta description" and "meta keywords" that are no longer used.
*Name attribute
The name attribute is used with the <meta> tag.
It's basically a way to tell all bots who can visit the page.
*Noindex attribute
The "noindex" attribute is a commonly used attribute in SEO.
*Description attribute
The description attribute, better known as the "meta description", is used with the <meta> tag.
The content of the tag is used in SERPs, below the content of the <title> tag.
It allows editors to summarize the content of the page in a way that will help searchers determine if the page meets their needs.
This does not affect a page's ranking but can help encourage clicks to the page from the SERPs.
<title>
<h1> to <h6>
Headings tags are used to indicate which parts of HTML content should be formatted as headers.
The tags are found in the <body> of the page, so the text is visible to users viewing the content on the page.
Header tags should be used to help structure the page.
When building a website, developers ensure that styles are associated with each type of header tag, i.e. words wrapped in a <h1> tag must-have look different from words wrapped in a <h2> tag.
A standard hyperlink is essentially a <a> tag.
<a href="www.example.com"> the anchor text for the link can be found here </a>.
The href = attribute dictates the destination of the link
The text between the opening <a> tag and the closing </a> tag is the anchor text.
This is the text that a user will see on the page that appears clickable.
This is used for clickable links that will appear in the <body> of the page.
The <link> tag is used to link one resource to another and appears in the <head> of the page.
These links are not hyperlinks, they are not clickable. They show the relationship between web documents.
Rel = "nofollow" attribute
The rel = "nofollow" attribute tells bots that the URL in the href attribute.
Using the rel = "nofollow" attribute will not affect a human user's ability to click on the link and be taken to another page.
It only affects bots.
This is used in SEO to prevent search engines from visiting a page or attributing any benefit from one linked page to another.
The "nofollow" attribute can be used by publishers to help search engines know when a linked page is a payment result.
The rel = "nofollow" attribute can be used on an individual link basis.
*Hreflang attribute.
The purpose of the hreflang attribute is to help publishers whose sites display the same content in multiple languages.
The hreflang attribute is used with the <link> tag.
This attribute specifies the language of the linked URL content, which is used in the <head> of the page.
The href = attribute indicates which URL is linked to.
The language code is a two-letter designation to tell search bots in which language the linked page is written.
The hreflang attribute can also be used in the HTTP header for documents that are not in HTML format (like a PDF) or in the XML sitemap of the website.
Canonical attribute
The rel = ”canonical” attribute of the link tag allows SEO professionals to specify which other page on a website, or another domain, should be considered canonical.
The canonical attribute looks like this:
The code must be in the <head> of the page.
The web page indicated after "href =" should be the page on which the search bots should consider the canonical page.
This tag is useful in situations where two or more pages may have identical or nearly identical content.
Picture
The <img> tag is used to embed an image in an HTML page.
It basically creates a container for an image that is hosted elsewhere.
This tag contains two attributes, one which is essential for the tag to work, the other which can be left blank.
Src attribute
The src = attribute is used to reference the location of the image that is displayed on the page.
If the image is located on the same domain as the container it will appear in, a relative URL (just the final part of the URL, not the domain) can be used.
Alt attribute
This attribute is used to specify the alt text to display if the image cannot be rendered.
The alt = attribute must be present in the <img> tag but can be left blank if no alt text is desired.
The alt = attribute should be considered in the first place to make websites accessible to those who use this technology.
Comments
Post a Comment