Solved

which is the best dtd in xhtml?

Posted on 2011-09-02
5
375 Views
Last Modified: 2012-05-12
which is the best dtd in xhtml?

what is the main difference of below dtd declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

which one is the best dtd for webpage?and how?...plz send me comments
0
Comment
Question by:codeoxygen
5 Comments
 
LVL 11

Expert Comment

by:Rajesh Dalmia
ID: 36472516
it depends on what type of html document you are making... you can get more details at

http://www.w3schools.com/tags/tag_DOCTYPE.asp

normally for xhtml... your 3rd doctype should be used...
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 36472520
Please ref . Look at here
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 36477418
If you don't need xhtml and can use html5 here is some info http://www.html-5.com/tags/doctype-declaration/index.html
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 250 total points
ID: 36490444
which is the best dtd in xhtml?

None of the above.  If you are serious about writing quality XHTML then you should use the STRICT XHTML DocType.  This will force better quality code as transitional code (a mixture of different versions) generally won't validate

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Open in new window


0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 36490735
Which ever you choose, it is a personal preference. They will all display your content. There are reasons for using one over the other that depend on your project.  This chart may help.  http://www.zvon.org/xxl/xhtmlReference/Output/comparison.html.  Now you can use html5 which requires no declaration and that will be the trend.  

There will be good arguments for and against "strict" but this is what the top sites are using...

www.nytimes.com, cnn.com, chicagotribune.com, latimes.com, ebay.com uses

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Match.com
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >


wordpress.com

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

MSN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


Google,youtube, facebook,yahoo,wikipedia, linkedin.com,apple.com
uses html5
<!doctype html>.  


0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
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…

785 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