网络编程
位置:首页>> 网络编程>> 网页设计>> 语义化的HTML与搜索引擎优化(如何编写纯语义的HTML进行搜索引擎优化)(2)

语义化的HTML与搜索引擎优化(如何编写纯语义的HTML进行搜索引擎优化)(2)

作者:Joost.De.Valk 来源:W3CGroup 发布时间:2009-12-28 12:42:00 

标签:搜索引擎,html,语义化

Headings,from h1 to h6
内容标题,从h1到h6

A good document has headings and subheadings, because headings make it easier to determine the topic of a page. These headings can range in importance from h1 to h6. To be honest, I never use h5 and h6 myself. I usually have only one h1 tag on a content page; on portal pages, blog homepages for instance; you can have multiple h1's, for all your articles for example. From a semantic perspective that might be weird, from an SEO perspective, it's great.

一个好的文档应该有主标题和副标题,因为它们可以更容易帮助确定一篇文章的主题。这些标题可以按重要性分为h1到h6.老实说,我自己从来不用h5和h6,经常只在页面内容中使用h1。在一些门户页面,比如说博客首页,你可以为你的每一篇文章使用一个h1,虽然这从语义上来讲可能不太合适,但从SEO的角度来看,这实在太棒了。

Strict semanticists sometimes suggest that you should only have one h1, two h2's, 3 h3's etc. I don't agree with that, as I think it's very normal for a document to have more than two h2's, in fact, this document has a lot more of them, and I think it's very well structured.

严格的语义学家有时会建议你只使用1个h1,2个h2,3个h3等等,不过,我不太赞同,我认为,一个文档中很容易会存在两个以上的h2,事实上,这篇文档中就有许多,我觉得它们组织的很好。

Very often, designers who have heard a bit about Semantic HTML will fit the name of a site in the header into an h1 tag. On the homepage of a site, that might be a very wise decision. On every other page within your site, you probably have a specific topic, which might be related to your site's name but doesn't have to be. On those sub pages, that topic should be in the h1 tag, and it's wise to put the name of your site into an h4 tag or maybe even a span.

经常,设计师们会听到语义化HTML将一个站点的名称放在一个h1标签中更适合。在站点首页,那可能是很棒的决定。在其他页面,你可能会有一些具体的主题,可能与你的站点名称有关或者没有,在这些页面上,主题可以放到h1标签,站点名称可以放到一个h4标签或者span标签内。

Search engines give the words used in the various headings more weight in determining the topic of a page. The keyword your page is optimized for should appear at least once in an h1 tag, and related keywords should be used in the other headings, as illustrated in Figure 1.

搜索引擎给那些在headings标签内帮助确定页面主题的字词更高的权重。你页面上要优化的关键词应该将它们放在至少一个h1标签内,其他相关关键词应该放在其他的headings标签内,如图1.

Figure 1:Include keywords in your page headings to improve SEO for your page.
图1:在页面上用headings包含关键词以改善SEO

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com