在XHTML / HTML中哪些元素具有语义价值,哪些是表现的,哪些不属于这两个类别?

[英]In XHTML/HTML which elements has semantic value , which are presentitional and which are not in both category?


In XHTML/HTML which elements has semantic value , which are presentational and which are not in both category?

在XHTML / HTML中哪些元素具有语义值,哪些是表示性的,哪些不属于这两个类别?

And who decide which tag is semantic, presentational? W3C or web developer with their own terms?

谁决定哪个标签是语义的,表现的? W3C或Web开发人员有自己的条款?

What is the difference between structural and semantic mark-up?

结构和语义标记之间有什么区别?

Is DIV and span not semantic , if yes then why we use ?

是否DIV和span不是语义,如果是,那么我们为什么使用?

3 个解决方案

#1


1  

Ordered lists (OL) and unordered lists (UL), for instance, are examples of markup elements with some semantic loading. The idea is to show to a client that several elements are somehow connected, for example, represent options in some menu. It helps screen readers which will read the menu options in sequence.

例如,有序列表(OL)和无序列表(UL)是具有一些语义加载的标记元素的示例。这个想法是向客户端展示几个元素以某种方式连接,例如,代表某些菜单中的选项。它有助于屏幕阅读器按顺序读取菜单选项。

And who decide which tag is semantic, presentational? W3C or web developer with their own terms?

谁决定哪个标签是语义的,表现的? W3C或Web开发人员有自己的条款?

Both. The standards dictate what and how is supposed to be used. Developers can either agree or ignore it (as with the ubiquitous case with tables used for design).

都。标准规定了应该使用的内容和方式。开发人员可以同意或忽略它(与用于设计的表格无处不在的情况一样)。

I believe the general idea is to treat (X)HTML construct as structural (with semantic meaning or without one), and use CSS to adjust presentational properties.

我认为一般的想法是将(X)HTML构造视为结构(具有语义或没有),并使用CSS来调整表示属性。

#2


1  

It depends, in general presentational elements are the ones that act on the look and feel of the object, while semantic gives only "significate".

一般来说,表示元素取决于对象的外观和感觉,而语义只给出“有意义”。

Example: what is the difference between:

示例:有什么区别:

<h1>Hey, I'm a title</h1>

and

<font size="36px">Hey, I'm a title</h1>

?

Pretty nothing, but tags are the one with also semantic value, because they mean something, instead of the font tag that contains only presentational things.

什么都没有,但标签是具有语义价值的标签,因为它们意味着某些东西,而不是仅包含表达事物的字体标签。

#3


0  

Semantic is about the meaning of an element. Presentation is about the look of an element.

语义是关于元素的含义。演示文稿是关于元素的外观。

E.g. <i> is a presentational statement, while <blockquote> or <q> is a semantic statement.

例如。 是表示语句,而

是语义语句。

I don't know whether there is a definitive list of elements that are seen as more semantic or more presentational, but generally you should be able to decide which one it is by simply asking you whether the markup says something about what the element is or what it should look like.

我不知道是否有一个明确的元素列表被视为更具语义或更具表现性,但通常你应该能够通过简单地询问标记是否说明元素是什么来决定它是哪一个。应该是什么样的。

<span> and <div> tags can be used to convey information about both, but they should be used to say something about the purpose of the element. The styling can then be set via CSS. So, while <span> and <div> have no meaning per se, the class or ID set for them should hold information about their purpose rather than their look.

标签可用于传达有关两者的信息,但应使用它们来说明元素的用途。然后可以通过CSS设置样式。因此,虽然
本身没有任何意义,但为它们设置的类或ID应该包含有关其目的的信息而不是它们的外观。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2010/03/08/d76c8fd33db39802316f0360148528b5.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告