www.webdeveloper.com
Results 1 to 8 of 8

Thread: What is the different between a HTML version, and a DTD?

  1. #1
    Join Date
    Aug 2006
    Posts
    255

    What is the different between a HTML version, and a DTD?

    According to this page on markup from the W3C:

    "W3C produces what are known as "Recommendations". These are specifications, developed by W3C working groups..

    ..XHTML 1.0 is the W3C's first Recommendation for XHTML
    "

    If XHTML 1.0 is a "recommendation" also called a "specification", then what is a document type definition?
    Want web development tutorials that are clear and easy to understand?
    The Now I Get It blog.

  2. #2
    Join Date
    Aug 2006
    Posts
    255
    Does a DTD simply define an XML specification, eg, HTML?

    Is this a valid statement:

    "This DTD defines the specs for HTML version 4.01."?
    Want web development tutorials that are clear and easy to understand?
    The Now I Get It blog.

  3. #3
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    a document type definition(DTD for short) tells the browser what type of web page your sending. you have 3 types for each version(transitional, strict and frameset).
    transitional is great for backwards compatability and such.
    strict is the best, it offers full compliance to the standards if it passes.
    frameset is the same as transitional, but frameset, frame and iframe elements are permited.

    your proberly better to google it though, since I'm terrible at explaining things.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  4. #4
    Join Date
    May 2005
    Posts
    2,040
    DTD is the definition of the elements and attributes you are using on your page and not the type of page you are sending. It has nothing to do with which version of html you are are using. There is no need for new web pages to use the transitional doctype.

  5. #5
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    The DTD defines that part of the HTML version definition that the browsers are supposed to follow. That part makes up about 30% of the standards that someone writing web pages to that HTML standard should follow.
    Stephen

  6. #6
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    callumd, a DTD is to HTML as grammar is to writing. They each define the syntax rules dictating what symbols or words may appear and in what order. And a DOCTYPE is a reference to a particular DTD.

    So for any given document, a software application can read the DOCTYPE, retrieve the DTD referenced by that DOCTYPE, and then use the syntax rules defined in that DTD to parse the rest of the document.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  7. #7
    Join Date
    Aug 2006
    Posts
    255
    Right, it's a lot clearer now.

    Thank you to everyone.
    Want web development tutorials that are clear and easy to understand?
    The Now I Get It blog.

  8. #8
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Web browsers tend to have their own syntax built in for HTML and so tend to not use the content of the DTD for HTML pages.
    Stephen

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles