New Bookstore! Save 20% on books with discount code: LAUNCH
Web Dev + WordPress + Security

Bare-Bones HTML/XHTML Document Templates

In this post I have assembled a concise collection of conforming, bare-bones document templates for the following doctypes:

Document Templates

Doctype Declarations

In addition to the complete document templates listed above, this post also provides the following doctype declarations:

  • HTML 2.0
  • HTML 3.2
  • HTML 5.0
  • XHTML 2.0
  • MathML 1.01
  • MathML 2.0
  • SVG 1.0
  • SVG 1.1 Full
  • SVG 1.1 Basic
  • SVG 1.1 Tiny
  • XHTML + MathML + SVG
  • XHTML + MathML + SVG Profile (XHTML Host Language)
  • XHTML + MathML + SVG Profile (SVG Host Language)

HTML 5.0

HTML 5.0

<!DOCTYPE html>
<html>
	<head>
		<title></title>
	</head>
	<body>
	</body>
</html>

XHTML 1.0

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>
      <title>XHTML 1.0 Strict</title>
   </head>
   <body>
   </body>
</html>

XHTML 1.0 Transitional

<!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">
   <head>
      <title>XHTML 1.0 Transitional</title>
   </head>
   <body>
   </body>
</html>

XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
      <title>Accessible XHTML 1.0 Frameset</title>
   </head>
   <frameset>
      <noframes>
         <body>
            <p>[..alternate accessibility information..]</p>
         </body>
      </noframes>
   </frameset>
</html>

XHTML Basic 1.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>XHTML Basic 1.0</title>
   </head>
   <body>
   </body>
</html>

XHTML 1.1

XHTML 1.1

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
   <head>
      <title>XHTML 1.1</title>
   </head>
   <body>
   </body>
</html>

XHTML Basic 1.1

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>XHTML Basic 1.1</title>
   </head>
   <body>
   </body>
</html>

HTML 4.01

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
      <title>HTML 4.01 Strict</title>
   </head>
   <body>
   </body>
</html>

HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <title>HTML 4.01 Transitional</title>
   </head>
   <body>
   </body>
</html>

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
   <head>
      <title>HTML 4.01 Frameset</title>
   </head>
   <frameset>
      <noframes>
         <body>
            <p>[..alternate accessibility information..]</p>
         </body>
      </noframes>
   </frameset>
</html>

Doctype Declarations

Doctype Declarations

HTML 2.0

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">

HTML 3.2

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

HTML 5.0

<!DOCTYPE html>

XHTML 2.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "TBD">

MathML 1.01

<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">

MathML 2.0

<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">

SVG 1.0

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

SVG 1.1 Full

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

SVG 1.1 Basic

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">

SVG 1.1 Tiny

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">

XHTML + MathML + SVG

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">

XHTML + MathML + SVG Profile (XHTML Host Language)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">

XHTML + MathML + SVG Profile (SVG Host Language)

<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">

Jeff Starr
About the Author
Jeff Starr = Web Developer. Security Specialist. WordPress Buff.
The Tao of WordPress: Become your own WordPress guru.

3 responses to “Bare-Bones HTML/XHTML Document Templates”

  1. August Klotz 2007/08/22 6:22 pm

    Thanks for the templates. As for conforming XHTML 1.1 doctypes, I have seen the html element written as:

    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
          xml:lang="en">

  2. Jeff Starr
    Perishable 2007/08/22 6:28 pm

    Are you sure that’s not for XHTML 2.0? I have seen this:

    <html xmlns="http://www.w3.org/2002/06/xhtml2"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2 TBD"
         xml:lang="en">

    ..but i think that only pertains to XHTML 2..

  3. Jeff Starr
    Jeff Starr 2009/01/25 9:42 am

    Note to self: remember to specify the document language via <html lang="en"> for HTML and <html ... xml:lang="en"> for XHTML.

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
USP Pro: Unlimited front-end forms for user-submitted posts and more.
Thoughts
Take a screenshot with Firefox (no extension required). Open Developer Tools Settings and enable the “Take a screenshot” button. Then click the button :)
Take a screenshot with Chrome (no extension required). Open DevTools, type Cmd + Shift + P, then type screenshot.
After 10 years working on my 2010 iMac, my upgrade finally arrived. Shiny new iMac shipped from Ireland :)
Too much caffeine weirds me out. But I love the taste of coffee. So once in a while I enjoy a small cup of decaf. Hits the spot.
Chris Coyier is a truly awesome person. One of the finest people I've ever worked with. Just #gottasayit
Excel won't open CSV file because SYLK format? Open it with text editor and add an apostrophe ' at the beginning of the file, save changes, done.
Displaying too many social media buttons and links all over the place imho makes you look desperate and frankly kinda sad.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.