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

  • 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"

<html xmlns="" xml:lang="en" lang="en">
		<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>

		<div id="container">

			<div id="header">

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

			<div id="footer">



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

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

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