Throughout this book, I've talked about HTML 4.01 Strict. 4.01
suggests, of course, that there have been previous versions of HTML (there have), but Strict
suggests that there is more than one version of HTML 4.01. There are three in total: Strict, Transitional, and Frameset, and all of them exist in XHTML 1.0 as well. Frameset (X)HTML gets its own chapter. There are also other elements that were included in previous versions of HTML but not in the latest, and elements that were never part of any HTML specification.
Transitional (X)HTML contains several attributes and elements that are deprecated, which means they're being phased out. These elements and attributes are hangovers from a time when presentational elements were all we had to make our pages look nice. By the way, the word hangover
is a perfect word to describe Transitional (X)HTML; presentational markup is not only passé, it's also a headache.
So what manner of presentational elements does Transitional HTML elements contain?
object
elememt.font
family of CSS properties with the sole exception of its color
attribute, which has been replaced by the CSS property color
.text-align
:center
.ul
element.input
element.font
family of CSS properties with the sole exception of its color
attribute, which has been replaced by the CSS property color
.ul
element.text-decoration
:line-through
and the del
element.text-decoration
:underline
, hyperlinks, and the ins
element.There are several attributes that were phased out as well. I won't mention attributes used only for transitional elements, but there are several that were used with elements that are also included in HTML 4.01 Strict.
It is worth noting that some of these haven't been entirely replaced.
text-align
in most cases. In the case of a caption
element, the CSS property caption-side
can place the caption above or below a table, but takes some extra CSS coding to place it at the left or right of the table.color
property and the :active
, :link
and :visited
pseudoclasses.body
element, and could only tile the images. This has been replaced by the CSS property background-image
.background-color
.img
and object
elements. This has been replaced by the CSS border-width
properties.br
elements when images or objects were floated, and had exactly the same element as the CSS property that replaces it: clear
.ul
and ol
elements, reducing the spacing between the li
elements. This has been replaced by the CSS properties margin
and height
.img
and object
elements, giving them space on the sides (hspace
) and top and bottom (vspace
). These have been replaced by the CSS property margin
.type
.hr
element. This has been replaced by the CSS property border
, since hr
elements are usually given a grooved border.whitespace
and the value pre
.hr
element to determine its height.body
element to set the default font color. This has been replaced by the CSS property color
.list-style-type
.li
element to reset the numbering in an ordered list. It has not been replaced.hr
to set their width. CSS property width
.Obsolete elements are elements included in previous HTML specifications, but were later dropped. One of these had rather dangerous results.
pre
element.plaintext
element, except it did recognize its own end tag, much like the title
and textarea
elements.Proprietary elements are the biggest mess left behind by the browser wars between Internet Explorer and Netscape. They were never part of any specification, and should never be used. I'll mention the two most common and iconic (and possibly most annoying) ones.
text-decoration
:blink
;
. This was introduced by Netscape.