DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Generic XHTML Template

08.17.2005
| 20032 views |
  • submit to reddit
        I'm often having to reconstruct this, as I can no longer memorize everything (just blank HTML and BODY tags used to be acceptable ;-)) with the DOCTYPE and namespaces.. so to make it easier to grab in future:

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

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="styles.css" type="text/css" media="screen" />
		<script type="text/javascript" src="common.js"></script>
	</head>

	<body>
		<div id="container">

			<div id="header">
			</div>

			<div id="wrapper">
				<div id="main">
					
				</div>
			</div>

			<div id="footer">
			</div>
			
		</div>
	</body>

</html>
    

Comments

Demetrios Kyriakis replied on Wed, 2007/02/21 - 9:48am

Very nice, but please add the template to style.css and common.js too.

Snippets Manager replied on Mon, 2012/05/07 - 2:14pm

nice