views:

62

answers:

3

In XHTML/HTML which elements has semantic value , which are presentational and which are not 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 ?

+1  A: 

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.

Developer Art
A: 

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.

Anne Schuessler
<em> is not presentational. <quote> doesn't exist.
Alohci
Yes, I think you're completely right. Please correct me if I'm wrong again, but in this case <i> would be the presentational conterpart of <em> and either <blockquote> or <q> are tags that mark something as a quote. Sound better?
Anne Schuessler
Almost. To think of <i> as a presentational counterpart of <em> is very common, because the default rendering of <em> is typically italics. But that's equally true of <cite>. It's actually best not to think of them as counterparts, but as independent elements each with their own use cases, and treat their default renderings as no more than coincidence.
Alohci
A: 

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.

LucaB