XHTML DOCTYPES & Templates

XHTML document templates with DOCTYPE declaration for XHTML 1.0 Strict, Transitional and Frameset and XHTML 1.1 Strict. Templates include placeholders for a stylesheet, javascript and declare the character encoding as UTF-8. Each template is also available as a cloneable Gist on GitHub.

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=utf-8" />
        <title></title>
        <link rel="stylesheet" href="style.css" type="text/css" />
        <script src="script.js" type="text/javascript"></script>
    </head>
    <body>
    </body>
</html>
View as gist on GitHub

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" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title></title>
        <link rel="stylesheet" href="style.css" type="text/css" />
        <script src="script.js" type="text/javascript"></script>
    </head>
    <body>
    </body>
</html>
View as gist on GitHub

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>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title></title>
        <link rel="stylesheet" href="style.css" type="text/css" />
        <script src="script.js" type="text/javascript"></script>
    </head>
    <frameset cols="25%, 75%">
        <frame src="frame1.html" />
        <frame src="frame2.html" /> 
    </frameset>
</html>
View as gist on GitHub

XHTML 1.1

<!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>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <title></title>
        <link rel="stylesheet" href="style.css" type="text/css" />
        <script src="script.js" type="text/javascript"></script>
    </head>
    <body>
    </body>
</html>
View as gist on GitHub