X/HTML Base Templates

These templates are the templates that I use when I code a web page "from scratch". It's best to put stylesheets in external .css files and JavaScript code in .js files, but I've included a <style> element and a <script> in the head because I often develop code that way at the beginning and then when I'm closer to completion I move the stylesheets and scripts to external files.

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">

</style>
<script type="text/javascript"><!--
// -->
</script>
</head>
<body>


</body>
</html>

XHTML 1.0 Strict

<!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" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title></title>
<style type="text/css">/* <![CDATA[ */

/* ]]> */</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--

//--><!]]>
</script>
</head>
<body>


</body>
</html>
Last update: 2006-07-30