XHTML Validation

With DTD how to Validate XHTML

An XHTML document is validated against a Document Type Definition (DTD). A proper DTD must be added as the first line of the file,before validating properly an XHTML file.


The Strict DTD includes all non-deprecated elements and attributes or those which donot appear in framesets:

<!DOCTYPE html PUBLIC”-//W3C//DTD XHTML 1.0 Strict//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

The Transitional DTDcontains everything which the strict DTD includes plus deprecated elements and attributes:

><!DOCTYPE html -//W3C//DTD XHTML 1.0 Transitional//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

The Frameset DTDincludes frames and all the other things which are included in transitional DTD:

><!DOCTYPE html PUBLIC
“-//W3C//DTD XHTML 1.0 Frameset//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd

This is a simple XHTML document:

<!DOCTYPE html
PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd” >
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
DOWNLOAD SOLUTION HERE