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?
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."?
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.
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.
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.
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.
Right, it's a lot clearer now.
Thank you to everyone.
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)