Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
317 views
in Technique[技术] by (71.8m points)

html - Is it alright to use multiple h1 tags on the same page, but style them differently?

I have a webpage that I use h1 tags multiple times within various DIVs and I style h1 for each div to be the appropriate size.

For example...

#content h1 {
  font-size:22px;
}

#left-nav h1 {
  font-size:14px;
}

#content .recent-news h1 {
  font-size:16px;
}

Is this alright? I am worried about SEO.

What is the best way to go about this? Or am I worrying about nothing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Matt Cutts from Google answered to More than one H1 on a page: good or bad? (Mar 5, 2009) with:

Well, if there's a logical reason to have multiple sections, it's not so bad to have, you know multiple h1s. I would pay attention to overdoing it. If your entire page is h1, that looks pretty Creti, right? So don't do all h1 and then you CSS to make it look like regular text because we see people, who are competitors complain about that if users ever turn off CSS or the CSS doesn't load, it looks really bad. So, you know, it's ok to have a little bit of h1 here and then maybe there's two sections on a page, and so maybe have a little bit of h1 here.

But you really should use it for headers or headings, which is what the intent is. Not to just throw h1 everywhere you can on a page. Because I can tell you, if you just throw h1 everywhere on a page, people have tried to abuse that and so our algorithms try to take that into account so it doesn't really do you that much good. So I would use it where it makes sense and more sparingly, but you can have it multiple times.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...