XHTML Doctypes
There are three types of Document Type Definitions (DTDs). The easiest and most commonly used is the XHTML Transitional document.
A list of the XHTML Doctypes:
- Strict
- Transitional
- Frameset
You should be very careful while writing XHTML document because the few XHTML elements and attributes, which are available in one DTD but not available in another DTD. So, you should select your XHTML elements or attribute carefully.
XHTML 1.0 Strict DTD
It is recommended to use when you want to use Cascading Style Sheet (CSS) strictly and avoiding to write most of the XHTML attributes.
Add the following DTD at the top of your XHTML document.
Syntax:
XHTML 1.0 Transitional DTD
It is recommended to use when you want to use many XHTML attributes as well as few Cascading Style Sheet (CSS) properties.
Add the following DTD at the top of your XHTML document.
Syntax:
XHTML 1.0 Frameset DTD
It is recommended to use when you want to use HTML Frames to partition the browser window into two or more frames.
Add the following DTD at the top of your XHTML document.
Syntax:
Note: You can use anyone of the DTD to write your XHTML document; if it is a valid XHTML document, then your document is considered as a good quality document.
0 Comments