| The Lowdown on HTML DTDs and DOCTYPEs |
|
|
|
| Saturday, 25 March 2006 | ||||||||
Page 1 of 6 Ever wondered where all the HTML tags we use are defined? Why there is a <p> tag instead of <para>? And why a <table> tag requires a <tr> tag, which requires a <td> tag? Have you ever wondered what that DOCTYPE line is at the top of an HTML file? If you have a hankering for understanding DTDs, this one is for you. What is this line at the top of some HTML pages? That particular DOCTYPE statement specifies that the HTML page uses the HTML 4.01 Loose DTD. Here is another example, which specifies that an HTML document would use the XHTML 1.0 Transitional DTD. So What is a DTD?The tags in the HTML language must be defined somewhere, right? They are defined in the DTD, which stands for Document Type Definition. In a DTD for HTML, all the HTML tags are defined. Everything is defined in the DTD -- the tags, the attributes, the possible values they can hold. Think of the DTD as the HTML tag dictionary: it lists all the tags, what they mean, and how they relate to each other. Also, there are different DTDs because there are different versions of HTML:
|
||||||||
| Last Updated ( Sunday, 26 March 2006 ) | ||||||||
| < Prev | Next > |
|---|










