[Pmwiki-users] DOCTYPE problem? feature?

Patrick R. Michaud pmichaud at pobox.com
Fri May 9 23:48:55 CDT 2003


On Fri, May 09, 2003 at 09:43:28PM -0500, J.R. Manes wrote:
> 
> I recently was trying to format a page with a table of width='100%'
> height='100%' and IE would only display the page with a width of 100%.  I
> wasn't able to correct this problem until I modified the DOCTYPE to just:
> 
> <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
> 
> leaving off the standard pmwiki extension to that:
>   "http://www.w3.org/TR/html40/loose.dtd"
> 
> Why was that dtd file used? And is disabling height=100% a feature or a
> problem?

I used that dtd file because it is what W3C says to use in HTML 
documents that do not conform to the HTML "strict" DTD 
(see http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#h-7.2).
I want PmWiki to be as compliant with the W3C HTML specifications as I 
can reasonably make it--i.e., I want the HTML that PmWIki produces
to validate via the W3C's HTML markup validation service.

In HTML 4.01 and XHTML 1.1, "height" is not a valid attribute for the 
<table...> tag.  So, if you create a table with a height attribute you
really ought to change the doctype header because it's no longer truly
HTML, at least as far as the W3C defines it.  However, I'm a little 
surprised that IE chooses to ignore the height attribute when the 
doctype is specified.  Apparently IE uses the existence or non-existence
of the URL in the !DOCTYPE declaration to decide if it will run in
standards-compliant mode or not.  That sounds pretty odd to me, but
see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp for a lot more discussion on this topic.

Anyway, each site administrator is of course welcome to decide what level
of HTML compatibility is important to him/her, and to set the !DOCTYPE
value accordingly.  PmWiki's default configuration will probably continue
to aim for true HTML compliance unless I hear lots of requests to the
contrary.

Pm




More information about the pmwiki-users mailing list