Tuesday, September 14, 2010

The importance of well-formed markup

Many logical styles are rarely used online, because they look no different from text
marked up using the likes of the i element. However, as mentioned earlier, physical
appearance alone misses the point of HTML. Always using the most appropriate relevant
element means that you can later individually style each element in CSS, overriding the
default appearance if you wish. If the likes of citations, defining instances, and variables
are all marked up with i instead of cite, dfn, and var, there’s no way of distinguishing
each type of content and no way of manipulating their appearance on an individual basis.
Well-formed markup involves more than ensuring visual flexibility, though. Use of the cite
tag, for instance, enables you to manipulate the Document Object Model (DOM) to
extract a bibliography or list of quotations from a page or even a full website. The ability
to style logical tags like this with CSS is likely to be of increasing rather than diminishing
importance.

No comments:

Post a Comment