[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

which is the best dtd in xhtml?

Posted on 2011-09-02
5
Medium Priority
?
386 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 54

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 1000 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 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 1000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

834 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