Chapter 10. âDistributed,â âExtensibility,â and Other Fancy Words
Diving In
There are over
100 elements in HTML5. Some are purely semantic (see Chapter 3), and others are just
containers for scripted APIs (see Chapter 4). Throughout the
history of HTML (see Chapter 1),
standards wonks have argued about which elements should be included in the
language. Should HTML include a <figure>
element? A <person>
element? How about a <rant>
element? Decisions are made, specs
are written, authors author, implementors implement, and the Web lurches
ever forward.
Of course, HTML canât please everyone. No standard
can. Some ideas donât make the cut. For example, there is no <person>
element in
HTML5. (Thereâs no <rant>
element either, damn it!) Thereâs
nothing stopping you from including a <person>
element in a web page, but it wonât
validate, it wonât work consistently across browsers (see A Long Digression into How Browsers Handle Unknown Elements), and it might
conflict with future HTML specs if itâs added
later.
So if making up your own elements isnât the answer, whatâs a
semantically inclined web author to do? There have been attempts to extend
previous versions of HTML. The most popular method is
with microformats, which use
the class
and rel
attributes in HTML 4.
Another option is RDFa, which was originally
designed to be used in XHTML (see Postscript) but is
now being ported to
HTML as well.
Both microformats and RDFa have their strengths and weaknesses. They ...
Get HTML5: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.