fbpx

Съвети и
вдъхновения

Tips and
Inspiration

How to Fix a Broken H-Tag – 2 Quick Tricks [Video]

Iskra Evtimova

Recently, I was given a website to audit and I noticed there was no H tag on any of the pages. As H tags are very important not only for SEO purposes but also for users, as well, I asked the website owner if there was a reason they hadn’t included any headings. As it turned out, there had been. When they tried to add an H tag, the whole paragraph changed and everything became huge. As they didn’t know how to fix it, they preferred to remove it.

However, I am not OK letting you skip some important parts of the optimization, so I will give you 2 quick tips on how to deceive WordPress and make it do what you want instead of the other way around.

So, first go to your WordPress website and load the stubborn page that causes you trouble.

Here, only the marked text should be an H2 tag but WordPress has a different opinion. So how can you fix it?

How to fix a broken H tag – Trick #1

Just hit enter after the last word of the heading. Sometimes, WordPress doesn’t separate the heading and the paragraph and this is the reason why your formatting crashes. WordPress considers the heading and the subsequent text as a single unit, and it applies the H tag to the whole section. To fix it, just leave one empty row between the headline and the text.

Then fix the text to be formatted as a paragraph.

How to fix a broken H tag – Trick #2

You will feel like a badass hacker when you learn this simple trick. Let’s start again from the initial problem.

On the upper right-hand corner, there are 2 tabs – Visual and Text. The Text tab opens the HTML code of the page. So click on it now.

Some headings explanations:

In order for WordPress to know which text is a headline and which is not when you select the option from the dropdown menu, WordPress surrounds the selected text with 2 tags – one at the beginning and one at the end. In my case, I am editing an H2 tag, so the open tag is < h2>and the closing tag is < /h2> without the space after the opening <. When you have the problem we are discussing here, the end tag is not after your headline but at the end of the whole paragraph. So you need to move it.

Steps to follow:

1. Find the section you need in WordPress. If you have a longer text, use Ctrl+F to open the find function.

2. Now locate the closing tag.

3. Cut the closing tag and paste it at the end of your headline.

4. Go back to Visual and TA-DA you are ready!

Yeah! Don’t you feel awesome?

N.B. Be careful not to cut a closing tag from another section, because this will break the other section as well. You must cut the first closing tag after the beginning of the headline you want to edit.

N.B. 2The example here is with an H2 tag. But if you are working with an H1 you should be looking for an closing tag.

So these are the two ways to fix a broken H tag. Don’t let such small details make you skip headings. Remember, they are important for SEO, and for conversion rates as well and they will make your website better. So go and fix that little bastard.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *