edit this page - page history - about editing

From HTML 4 to XHTML 1


Recently I made a Journals style that had to be valid to XHTML (strict) instead of just HTML. While working on this, I made a couple of observations.


The doctype for XHTML strict documents:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


IFRAME is no longer permitted in XHTML, but you can do the same thing with the OBJECT tag (source):
<object data="sourcefile.html" type="text/html">
(text for other browsers)


NOBR was never part of the HTML 4.0 standard anyway. To do the same thing in CSS:
.nobr { white-space: nowrap; }


The align="absmiddle" attribute is not supported in XHTML, but using middle seems to work just as well. Also, you can't use a border attribute on an IMG tag (use CSS instead).
Categories: Article | HTML
edit this page - what links to here? - page history - top
Last edited by jevon jevon 149 months ago