(X)HTML DOCTYPES

For copy & paste | page version 1.0

I collected the most common HTML templates with valid doctypes that can be used in web development. I also inserted the must have tags in the <HEAD> section that you have to set on any webpage.

Useful links for furher tweaking

Send me ( to tibi@szasz.hu ) more useful links stricty related to the topic.


XHTML 1.0 Transitional Document

<!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></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="content-language" content="en" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <link href="favicon.ico" rel="shortcut icon" />
    <script type="text/javascript" src="js/main.js"></script>
</head>
<body>
</body>
</html>

XHTML 1.0 Strict Document

<!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">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="content-language" content="en" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <link href="favicon.ico" rel="shortcut icon" />
    <script type="text/javascript" src="js/main.js"></script>
</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">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="content-language" content="en" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <link href="favicon.ico" rel="shortcut icon" />
    <script type="text/javascript" src="js/main.js"></script>
</head>
<frameset>

<noframes>
    <body>
        <!-- place alternative information for accessibility purposes here -->
    </body>
</noframes>

</frameset>
</html>

XHTML 1.1 Document

<!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">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="content-language" content="en" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <link href="favicon.ico" rel="shortcut icon" />
    <script type="text/javascript" src="js/main.js"></script>
</head>
<body>
</body>
</html>

Here comes the HTML templates

If you prefer them for some reasons :)



HTML 4.01 Transitional Document

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="en">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link type="text/css" href="css/style.css" rel="stylesheet">
    <link href="favicon.ico" rel="shortcut icon">
    <script type="text/javascript" src="js/main.js"></script>
</head>
<body>
</body>
</html>

HTML 4.01 Strict Document

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="en">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link type="text/css" href="css/style.css" rel="stylesheet">
    <link href="favicon.ico" rel="shortcut icon">
    <script type="text/javascript" src="js/main.js"></script>
</head>
<body>
    <p>Hello world!</p>
</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></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="en">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link type="text/css" href="css/style.css" rel="stylesheet">
    <link href="favicon.ico" rel="shortcut icon">
    <script type="text/javascript" src="js/main.js"></script>
</head>
<frameset>
<frame src="hello.html">
<noframes>
    <body>
        <!-- place alternative information for accessibility purposes here -->
    </body>
</noframes>

</frameset>
</html>
Valid XHTML 1.1 & Valid XHTML 1.1

Valid XHTML 1.1 Valid XHTML 1.1