RE: HR 40 DTD Problem with <HR>?

Allen Strand <astrand@ix.netcom.com> wrote:

> So if I understand this, then <HR WIDTH="80%"> is ok
> and the validator does not properly handle it??

You are misunderstanding.  HTML 4.0 specifies three DTDs, namely,
Strict, Transitional, and Frameset [1].  As Ian said, the Strict DTD
doesn't include any of the presentation attributes, such as "width",
while the Transitional (and Frameset) DTD does.  So if you use
the following document type declaration:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
        "http://www.w3.org/TR/REC-html40/loose.dtd">

Then the validator will handle <HR WIDTH="80%"> properly, but if you
use the following document type declaration:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
        "http://www.w3.org/TR/REC-html40/strict.dtd">

Then the validator will not recognize width attribute of HR element,
as it is not defined in the Strict DTD.

[1] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.2

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Saturday, 23 January 1999 03:53:59 UTC