Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
3  
Why not style your <h2> using CSS? –  Mike Chess Oct 6 '11 at 13:25
    
Yes.. i am going t use the css now ..thanks. –  Sangram Oct 6 '11 at 19:50
add comment

3 Answers

up vote 7 down vote accepted

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.)

share|improve this answer
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 '11 at 11:57
    
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 '11 at 12:00
2  
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. –  DisgruntledGoat Oct 6 '11 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 '11 at 19:16
add comment

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.

share|improve this answer
    
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 '11 at 19:50
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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