articles
Are the semantics of HTML all the same? Or are there different kinds of semantic classifications of elements and attributes? I'd suggest that among HTML elements, there are at least two, and possibly three distinct kinds of semantic element - structural semantics, content semantics, and rhetorical semantics. The case is less clear among attributes, which I don't think play a structural role, but even there, there appears to be two types of semantics - content semantics, and a set of attributes which exist to extend HTML's listed semantics, either by design, or by convention.
Semantic classification of HTML elements
structural
The semantics of these elements are a function of the role they play in a documents structure.
- div
- span
- ol, ul, li, dl, dt, dd
- del, ins
- h1 .. h6
- p
content
The semantics of these elements is a function of the type of content they markup, ather than the role these elements play in a document's structure.
- a
- abbr
- acronym
- address
- blockquote
- cite
- code
- dfn
- kbd
- q
- samp
- var
rhetorical
These semantics of these elements is afunction of the authors rhetorical devices, rather than the role the elements play in a document, or the content they markup in particular.
- em
- strong
Not entirely clear
I'm not entirely sure whether these elements have structural or content semantics, or whether, as may well be the case, they belong to both classifications.
- blockquote
- cite
- q
Semantic classification of HTML Attributes
Attributes are more difficult to classify semantically than elements, because rather than marking up document content, they typically add meta data to that content.
Usually, attributes will be associated with content semantics A handful exist largely as an extension mechanism for HTML's limited semantics, either by design (arguably class and id) or convention (arguably rel and rev).
content
- alt
- cite
- datetime
- lang
- longdesc
- title
extensibility
- class
- id
- rel
- rev
Comments
Got any comments, suggestions, thoughts or feedback? Please join the discussion at microformatique, a blog about web semantics, and microformats.