开发者

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开发者_Go百科 in both category?

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

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

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


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.

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

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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜