XHTML 1.0 Strict Validation!

(most tedious bit.)

Extensible Hypertext Markup Language or XHTML is a more strict version of HTML which allows compatibility for basically every major browser. Today's market consists of different browser technologies. Some browsers run on computers, and some browsers run on mobile phones or other small devices. Smaller devices often lack the resources or power to interpret "bad" markup. Therefore we try to make all our code XHTML Strict. To make things XHTML strict, we will need to maintain good document structure e.g. putting in DOCTYPE and <html> tags, use XHTML elements e.g. close the tags and use correct XHTML attributes. For an example, you must type your attributes in lowercase.

So How Do I know if My Document is XHTML Strict?

A way to check if your webpage is XHTML strict is by looking checking out the W3 XHTML Validator. To use the validator you can validate your code by direct output, URI or the actual HTML document from your computer. Pretty convinient. Trouble-shooting is realtively annoying (added by Daniel) in XHTML. For an example this is WRONG:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">	
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	</head>
	<body>	
</html>

Notice how I have NOT ended the <body> tag. This is not XHTML valid as all tags must be finished correctly. The validator says this as well:

Not Validated Image

Tip, click the image to see a larger version.

Now that we have shown you and example, its up to you to make this short challenge XHTML Strict!

Make This XHTML Strict Valid:

See the Pen non-xhtmlvalid by Sithum Dissanayake (@SithumD) on CodePen.