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

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

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

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

Introduction
简介

So what is POSH? No, it's not just some new clothing fashion hype amongst web designers - POSH is the acronym for Plain Old Semantic HTML. The term Semantic HTML is used for a variety of things, but it has it's origin in one objective: creating (X)HTML documents using semantic elements and attributes, as opposed to using presentational HTML. The term POSH was coined because a group of highly respected web designers wanted to have a short mnemonic to easily capture the essence of the concept of Semantic HTML.

什么是POSH?它可不是网页设计师们谈论的服装、时尚,POSH是plain old Semantic HTML的缩写。Semantic HTML可以用在很多地方,不过,它的本意是创建(X)HTML文档中,使用语义化的对象或属性,而不用表象(只为显示效果)的HTML。POSH的产生,来自一群令人追崇的网页设计师,他们希望能够写出简短、易记,能够使人一看就知道其意义的语义化HTML。

In this article, I talk about why you should use POSH, exactly what you need to do to implement it (many of you are probably doing this already, and a few of you might not even realize it!) and how you can optimize it to improve SEO for your site. I also take a brief look at Microformats at the end of the article.

在这篇文章中,我会讲述为什么要使用POSH,你应该如何正确地去做(可能有一些你们已经在做,有一些你还不了解)以及如何去改善你的站点的SEO。我会在文章后稍微看一下微格式部分。

Why Should I Use Semantic HTML?
为什么要使用语义化的HTML?

You could just say: "because it's the right thing for the web," but it's benefits go far beyond that. For instance, it makes it easier for screenreaders to interpret in an order that will make sense to users with visual impairments.

你也许会说:“因为它对WEB有好处”,然而,它的好处远不止于此。比如,它使得屏幕阅读器更容易使用,这对那些视觉障碍的用户将非常有意义。

Secondly, SEO and Semantic HTML are close friends. They might sometimes have conflicts of interest, which we'll get to later on in this document, but over all, they're friends. The purpose of SEO is to help search engine spiders better understand what a page is about and therefore categorize them better. Since a search engine spider basically has even less capabilities than a screenreader, it needs even more guidance in determining a page's structure and topic. Good semantic HTML provides just that structure.

其次,SEO对语义化的HTML更亲睐。他们可能有时候会有一些冲突(我们将在后面看到),但是,语义化HTML仍然是对SEO非常友好。SEO的目的是帮助搜索引擎更好地理解一个页面讲述的是什么主题以便更好地对它进行分类。既然搜索引擎都只有这些基础功能,更何况是屏幕阅读器。它们需要在页面结构和主题确定时给予更多的提示。好的语义化HTML将会是很好的支持。

Semantic HTML tries to convey meaning through the words and the tags on a page. Try thinking of it this way: the content on the page is the words you speak. The tags provide the structure, the intonation, the pauses and even the looks on your face. Basically, your tags are half your message.

语义化的HTML会试图将页面上标签与标签中的内容联系起来。你可以试着这样去想:页面上的内容是你需要念出来的,而标签提供了一种结构,语调,停顿等辅助信息,基本上,标签起到了另一半信息的作用。

Site Structure
站点结构

In my previous article on dev.opera.com I talked about site structures, with the aim of providing a clear way for search engines to discover which page on your site discusses which topic - this can be further improved by using Semantic HTML.

在我发表在dev.opera.com上的前一篇文章里,我谈过了站点结构,目的是为了提供给搜索引擎一个更清晰的更好的方法来发现你站点中哪一页上谈论哪一话题,这个可以通过使用语义化HTML来实现。

Page Structure
页面结构

A page consists of a title, one or more headings, and content. This content can contain paragraphs of text, lists, quotes, images and tables. All these types of information have their own designated tag(s). We will treat all those tags, starting with the headings. Use this page about sortable tables as an example to follow along with for the coming points.

一个页面会由一个主标题,一个或多个内容标题,和内容来组成。内容部分可以包括段落,列表,引用,图片和表格。所有的这些资料都会有它们特定的标签。我们将一个一个来分析,先从内容标题(headings)开始。用一个排序表格的页面来做例子。

0
投稿

猜你喜欢

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