Category:Semantics

From CSS Standards FAQ

Jump to: navigation, search

Semantic HTML means you use tags with structure in mind rather than presentation. This means you should use tags that describe content rather than the intended look/style. ex: you use any of the <h[1-6]> tags for a heading, <p> tags for a paragraph and so on. This use of HTML is described in guideline 3 of the WCAG 1.0 W3C recommendation and will help make your site content accessible to all (though not your design), including search engines and other automatic parsers. Your classes and ids should also be semantic by describing an element's content (eg. "title","header","entry" e.t.c. ) rather than the style (eg "blue", "top", "right", etc. are incorrect).

Since (X)HTML likely has not defined all of the tags you may need to markup your content semanticially, you have to use classes and ids to do so, but before you use a <div> with an id or class to create the element you need do check of the HTML tag reference to ensure that the tag does not already exist.

Microformats is a movment that tries to standardize the names you use for your classes so that parsers may treat some content diffrent from other content, sort of like how tags already work.

Further reading

Articles in category "Semantics"

There are 6 articles in this category.

C

F

H

I

M

Personal tools