Solved

Doctype?

Posted on 1998-06-10
5
287 Views
Last Modified: 2010-05-18
How shall I write "Doctype..."? I don´t understand which HTML standard I shall write
and if I shall write the lowest standard or the highest standard or all standards I use?

I have been on the World Wide Web Consortium:s site but I didn´t get any wiser...
0
Comment
Question by:ewakajsa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:TAMC
ID: 1844171
What do you mean by Doctype?, I write lots of HTML files and never used such a thing.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 10 total points
ID: 1844172
I agree with TAMC, I only used doctype for validators but since I am using HOMESITE with validation built-in, I have stopped using it. The strange thing is that a lot of people include one and the immediately ignores it.

If you insist, here is what IRT says:

A DOCTYPE statement (or DTD), located on the first line of an HTML document, designates the standard of HTML which
you have chosen to use. HTML Validators require DTD statements. Without a DTD, they will usually fall back to a default
DTD (many times HTML 2.0), most times causing many errors.

Three common DTDs are:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> for HTML 4.0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> for HTML 3.2
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> for HTML 2.0

There are many more DTD statements available for use...

Try http://www.ccs.org/html/dtd/
and http://www.ccs.org/html/dtd/why/index.html
for more info

0
 

Author Comment

by:ewakajsa
ID: 1844173
But I still don´t  understand if I shall write HTML 4.0 or 3.2....in Doctype. If I write HTML 4.0 in Doctype does that imply that the validator accept HTML below 4.0?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1844174
Aha... The HTML you produce must conform to the DOCTYPE you write if you wish the validator not to puke. If you write any 4.0 html do not put 3.2 unless you are prepared for the error messages.

The validators are downwards compatible so if you write 3.2 HTML you may have a doctype 4.0 but will get error messages or warnings if you use any tags that was depricated (I know only of a few 3.0 tags that never made it into 3.2).

Enjoy,

Michel
0
 

Author Comment

by:ewakajsa
ID: 1844175
Now I get it....thanks a lot!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mobile apps - web/native or hybrid? 1 120
Adding 1 the value of input "text" every 3 seconds 5 48
BG appearing and then disappaear after a second 8 61
aria difference 2 22
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question