An XHTML 5 Template

Here is a basic XHTML5 template that you can use as a starting point for creating all your web pages if you decide to use XHTML5.

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>An XHTML 5 Template</title>
...
<link rel="stylesheet" href="css/main.css"/>
</head>
<body>
<header>
...
</header>
<main>
<article>
...
</article>
<aside>
...
</aside>
</main>
<nav>
...
</nav>
<footer>
... </footer>
<script type="application/javascript" src="myscript.js"/>
</body>
</html>

Let's now take a look at the template and consider why certain things are or are not included.

A lot of advertising scripts still continue to use document.write statements which are not permitted in XHTML. To use any such script with XHTML you'd need to use postscribe to parse the document.write calls and convert them into JavaScript calls that XHTML does support. The conversion requires that an id be placed in the aside where the ad is to appear and the advertising script still goes at the bottom of the page with the postscribe call specifying the id where the converted code is to write to.

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate