Solved

which is the best dtd in xhtml?

Posted on 2011-09-02
5
380 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 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

Industry Leaders: 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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

740 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