You are here: Re: What for does one need doctype? « HTML « IT news, forums, messages
Re: What for does one need doctype?

Posted by cwdjrxyz on 11/21/27 11:48

test@loctopus.com wrote:
> Hi everybody,
>
> What for does one need to use doctype? I did not put this tag into my
> HTML code and everything looks OK (besides that HTML-validator tells me
> that my document is not valid). Can the absence of the doctype lead to
> more significant problems?

You have received several answers. Perhaps it is now time for an
example. I slightly modified a DynamicDrive script for someone asking
for a text mousetrail effect. Viewed with Firefox, the script would
work at DynamicDrive, but not when I put it on an html 4.01 strict page
with the proper Doctype. I found the script would work if you used no
Doctype as DynamicDrive did, or if you used the proper Doctype for html
4.01 transitional. Keep in mind that this is rather old script that
still includes Netscape 4 support. This type of effect is not of much
interest to me, but to each his own. If you do not like the effect, the
complaint department is at DynamicDrive! The slight modifications
mentioned that I made were just a few things to make the code validate
at W3C.

First view http://www.cwdjr.net/text/mousetail.html . This works on any
browser I have if script is turned on. The Doctype is for html 4.01
transitional. Next view http://www.cwdjr.net/text/mousetailStrict.html
.. This is exactly the same code as for the first page except that it
uses the Doctype for html 4.01 strict. What you will see for the strict
version depends on the browser you use. The page works properly only on
my Opera 8.54 and Netscape 4.8 browsers. It does not work properly on
my Firefox 1.5.0.3, IE-6, Netscape 8.0.4, or Mozilla 1.7.11 browsers,
and the letters of the text stay fixed in the upper left corner of the
screen.

Even if one's standard is only that the page works properly, I think
this example shows that, at least in a few cases, use or nonuse of a
Doctype can change how the page views, or if the page works at all. I
have not had time to see just what produces the strange response seen
on these examples, and since I do not use this code myself, I am
unlikely to waste time on the details of it.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация