Solved

which is the best dtd in xhtml?

Posted on 2011-09-02
5
381 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
[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
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 53

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 53

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

742 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