How to correctly write html tags in your WordPress themes

Many of you use free WordPress themes and don’t pay attention to how these themes are optimised. Promoting your blog, paying for the search engine promotion company, you get at best 60% of the desired positions in the issue. There is a chance to save money if you correctly optimize your topic at the start.

If you are ready, then we will begin.

Writing html tags correctly for the whole WordPress blog, starting from the main page:

The homepage of the blog and the rest of the pages have a significant difference to the promotion.
The main page gives the user an understanding of the entire blog and aims to promote the main page of the blog.
Articles and static pages are target and support pages. Tags in them are distributed differently.

First of all, we optimise the blog header (header.php) on WordPress.

H1 tag in WordPress template .
The main tags for the whole blog are H1-H2. The texts in these tags, based on the previous article, are the most significant for search ranking.
H1 tag is recommended to use only 1 time per page. Tag H2 no more than 2 times.
For search engines, it is better when the title meta tag and H1 title mostly coincide. Also for search engines it is important to use words from the title in the url of the page.
Many bloggers, in the header of their blog, use a logo or graphics for the title. Such a method is allowed provided it is used correctly.

Description of the correct way to embed graphics in the H1 tag:
The H1 tag is used as a container for the logo and text title. At the beginning, a logo image is written into the tag, and then <br /> the heading text goes. In the css style, for H1, we specify the width and height of exactly the same size of the picture overflow: hidden ;. Thus, when the browser displays our header, we will see the logo in the header, and the text will be squeezed into the invisible part of the block.
Search engines will index the title text, and users will see a beautiful logo.

H2 tag in WordPress template 
Tag H2 is better to highlight a short description. On the main page, in the header of the template, there is often a description of the blog. This is a kind of brief abstract blog. This description is desirable to highlight the tag H2. Also, the H2 tag is appropriate when selecting headings for headings, tags, an archive, and a search page. The main thing is not to be confused. For example, entering the WordPress category, the H2 tag is highlighted by the title of the column itself, and the titles of articles in the category are written with the H3 tag.

Dynamic H1-H2 for WordPress 
There is one nuance associated with the tags H1-H2. As I said, the use of these tags on a single page is limited. The main page narrates and promotes the entire blog, and the articles and static pages promote themselves. This means that for static pages and pages of articles the main title will be the title of the article, and the title in the header should be secondary.

Here is a way to dynamically change the header header tag from H1 to H2:

& lt ; ? php if ( is_single ( )  || is_page ( ) )  { ? & gt ; 
< h2 > Blog Title </ h2 > 
& lt ; ? php } else { ? & gt ; 
< h1 > Blog Title </ h1 > 
& lt ; ? php } ? & gt ;

Now you need to specify in the template for articles and static pages heading in H1, in single.php and page.php files, and use the words from the headings and descriptions in the text of the articles. In this way, we get blog pages that are relevant to search engines.

H3 tag in WordPress template 
The H3 tag needs to highlight the following significant headings on the blog page. Important headlines are – headlines of articles on the main page of the blog, as well as headings of articles in categories, tags, archives, search page.

H4 tag in WordPress template 
Tag H4 is necessary to highlight the name of the widget in the sidebar. Also, in the articles themselves it is recommended to use the H4 tag and below, to highlight the subtitles in the article.

H5-H6 tag in WordPress template 
Tags H5-H6, you can select all the other block headers. For example, comment blocks, etc.

Use of tags <b>, <strong>, <em> in the text of articles. 
Search engines love the text in these tags. Therefore, be careful when selecting these words in the article with these tags.
Use these tags to highlight key phrases and words, and create a class similar to these tags for visual highlighting.

Using the attributes alt = “” and title = “” in the links and graphics. 
For search engines, it is important what is written in the attributes of links and pictures on your blog pages. Try to always use these attributes with your keywords.

Let’s sum up:

Html tags in WordPress are as important as in any other resource located on the Internet. Proper placement of tags in the source code of a WordPress template is a guarantee of confident advancement in search results.

  • H1 – everywhere except for static pages and articles in the blog header, in the headlines of articles on the blog pages.
  • H2 – the description in the header of the blog, in the headings of the pages of headings, tags, archive and search pages.
  • H3 – headlines of articles on the main page of the blog, as well as headlines of articles in headings, tags, archives, search page.
  • H4 – the names of widgets in the sidebar and subtitles in articles.
  • H5 – the rest of the blog headers.
  • <b>, <strong>, <em> – keywords and phrases in articles.
  • alt = “” and title = “” – desirable attributes in links and graphics in blog articles.

I hope that I was able to answer the question of how to correctly write html tags in my WordPress themes.

Seo Consultants London