Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choosing <DOCTYPE> ?? how to

Status
Not open for further replies.

RodS2

IS-IT--Management
Sep 11, 2007
33
US
I've read up on doctypes but I honestly am not sure how do I know which doctype to choose. I have been validating my website w/ the w3c validator and the validator even says it cannot parse my site. My site can be found at




can anyone tell what the doctype is?
 
You do not specify a doctype, therefore the validator assumes HTML 4.01 transitional. See: Choosing a DOCTYPE or just start your page like this for HTML 4.01 Transitional:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html...


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Here:

Basically a Doctype tells a browser how it should render a page. This makes the page look the same across all browsers.
The more common one to use is:
[red]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[/red]

This means this page is to be rendered according to a set of rules defined in the doctype. Transitional doctypes give you a little morel leeway in the syntaxes you can use when creating the page.

I suggest using the doctype above. To use it just place it at the top of your document , it should be the very first thing in the page. even before the html opening tag.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top