Closed Thread Icon

Preserved Topic: !DOCTYPE (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18368" title="Pages that link to Preserved Topic: !DOCTYPE (Page 1 of 1)" rel="nofollow" >Preserved Topic: !DOCTYPE <span class="small">(Page 1 of 1)</span>\

 
Dark
Neurotic (0) Inmate
Newly admitted
posted posted 12-09-2001 17:48

Ok this may sound a bit stupid, but do you think that a website actually "needs" a Doctype? If so then how do you decide what type yours needs to be?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> is what I keep hearing and I just don't see the purpose of it. Is it to help browsers and search engines? Or is it just to help out the coder?

:: Jon ::

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-09-2001 21:33

technically you 'need' it, because unix servers don't use extensions to determine the type of file you're reading, so this is your way of telling the server "hey! I'm a webpage! Don't run me, just send the text!

Nowadays, servers are pretty smart, so they can recognize and display the file without that line. However, it is good practice to include it for -as you said- search engines, some browsers, and for cgi to be able to know what it's doing...

I may be wrong, someone correct me if I am....


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-10-2001 00:51

it also is defined in the w3c guidelines.

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-10-2001 09:13

good point grumble-man... standards should be supported..... which is why netscape sucks...


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-10-2001 22:07

Petskull, UNIX servers are not stupid. That line isn't used for that (Apache, the most widely used web server on *NIX platform uses information from MIME configuration file to determinate file type).

Anyway, old web browsers don't care about !DOCTYPE line, since they can only render specific set of HTML tags/formatting. On the other hand, new web browsers use !DOCTYPE line to determinate if you're using XML/XHTML instead of plain old HTML code. Also, new web browsers (Mozilla & IE6) use !DOCTYPE line to determinate whether they should render page in standards compliant mode or use old "quirks" mode (more info: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp )...


Dark
Neurotic (0) Inmate
Newly admitted
posted posted 12-11-2001 03:27

Max

So what be the most standard !DOCTYPE to put on a normal web page? I use CSS, html, dhtml, and JS. Is there certain types I can use? Or can I just stick what I had in the first post? btw- I did read this article, but it didn't really explain what the most common used form of !Doctype was or how not using the right one would effect your page.


<Edit> Should I use Transitional, FRAMESET, or Strict? </edit>



[This message has been edited by Dark (edited 12-11-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-11-2001 08:19

I prefer HTML 4 Transitional (without dtd file specified - only <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">) for two reasons - it allows use of deprecated elements and instructs new web browsers to render page in old "quirks" mode...


Dark
Neurotic (0) Inmate
Newly admitted
posted posted 12-11-2001 16:27

Thanks max =)

« BackwardsOnwards »

Show Forum Drop Down Menu