8

I have read that <h2> tags are important for seo and SEO expert prefer <strong> tags over <b> tags. But what if i want to use both (h2 and strong) together ?

So suppose if i want to use tags with tags,

Ex. 1

<h2><strong> my title text </strong></h2>

Ex.2

<strong> <h2> my title text</h2> </strong>

Which one is better in terms of seo or both are same?

UPDATE: <h2> tag inside <strong > does not produce the Strong effect. So i will have to use the Ex.2 to make the words STRONG else it will be just a h2 tagged text.

1
  • 4
    Why not style your <h2> using CSS?
    – Mike Chess
    Oct 6, 2011 at 13:25

3 Answers 3

9

It's not advisable because it is unecessary. <h2> has semantic meaning as a page subheading and it is given the appropriate weight in ranking alogirthms (basically <strong> is implied). Also, by default their contents are displayed in bold by the major web browsers so using the <strong> tag within them shouldn't be necessary. So by placing a <strong> tag inside of a <h2> tag you are probably going to raise a red flag with the major search engines.

(Also, don't do silly things like this just for search engines. All you're doing is wasting your time. Write proper code and publish good content.)

4
  • 1
    Yes..i am mainly focusing on the content but some small seo things might help me in getting good rankings. i am following google's seo guidelines not any black hat methods.Taking care of the seo for my site is not a Silly thing John. Is it? :-)
    – Sangram
    Oct 6, 2011 at 11:57
  • 1
    I agree with what you have said John. Should not mix <h2> with <b> as both have their own weight and meaning in search engines algo.
    – Sangram
    Oct 6, 2011 at 12:00
  • 3
    Putting <strong> inside an <h2> is not remotely a "red flag". But you're right in that it's useless and the heading should be styled with CSS. Also remember that if you're set on using both, <strong> must be inside the <h2> not vice-versa. Oct 6, 2011 at 15:58
  • ... because block elements such as headings should not generally appear within inline elements such as emphases tags. ahuka.com/?page_id=119
    – deizel.
    Oct 7, 2011 at 19:16
4

It's not a problem SEO-wise to do this. There are many ranking sites that have 'ugly' HTML code. From a HTML coding perspective, you should use CSS to indicate that the text in a H2 tag with a particular class or id will be bolded in its entirety. It would be OK to use if you wanted to have part of the H2 text bolded and part not. This would be rather unusual but acceptable and, once again, would not impact SEO at all.

It's very easy to get bogged down in trivia like this when doing SEO. Try to avoid this and instead concentrate on getting strong, legit, links to your site and developing content that people naturally link to on their own.

2
  • Yep..Thanks you. I be will focusing on the content but thought of making my post seo friendly too. Its quite possible that good isn't ranked because of the bad SEO..
    – Sangram
    Oct 6, 2011 at 19:50
  • if you wanted to have part of the H2 text bolded and part not: agreed and I would do it this way: <h2>Bold <span class="bolder">and bolder</span></h2>. Mar 21, 2019 at 10:13
1

As others have noted, you're better off handling the styling of tags through stylesheets.

Here is a quick example:

<!DOCTYPE HTML>
<html>
<head>
    <style>
        h2 { font-weight: bold; }
    </style>
</head>
<body>
    <h2>my title text</h2>
</body>
</html>

This is considered more correct and will confer as much SEO value as wrapping the text with tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.