|
Posted by Benjamin Niemann on 03/08/06 11:41
David Dorward wrote:
> terry wrote:
>
>> I do have one more error that I could use help with. The DOC TYPE ... I
>> don't know what I have or even how to find out. I know that sounds
>> idiotic but what can I say. I've read stuff on w3.org and other sites
>> but I've never run across a way to determine what I have. Maybe I'll
>> try the "trial and error" method.
>
> Generally you should pick a markup language and write your code to that,
> and your choice of markup language will determine the Doctype. Writing tag
> soup then trying to guess what Doctype best fits it is pretty much doomed
> to failure.
>
> This side of the millennium, browser support for stylesheets is good
> enough to switch to HTML 4.01 Strict[1]. We haven't yet reached the stage
> where using any form of XHTML is useful for the (vast) majority of
> authors.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
>
> [1] With a few rare exceptions ... well ... one exception. The start
> attribute for ordered lists, but that doesn't get used often.
But beware: Because the validator did not find a document type declaration,
it implied HTML 4.01 *transitional*. If you know use the strict doctype
(which is, eh.. stricter :) ), the validator gives you ~50 new errors...
If you want to stick with transitional for now (and convert to the prefered
strict later), use
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Navigation:
[Reply to this message]
|