How to write HTML 5 DOCTYPE

HTML5 DOCTYPE

Below is the HTML5 document for the correct doctype:

<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″ />
<title>Add Your Header Here</title>
</head>

<body>
Add Content Here….
</body>
</html>

Prevously it was:

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Add Your Header Here</title>
</head>

<body>
Add Content Here….
</body>
</html>

You can still use both, they both work.


Related posts:

How did I build my WordPress web site? (Part 1 of 2)
Flash intro is dead, get over it!
HTML5 History
HTML5 page flip
HTML5 upload with demos and tutorials

Write a Comment



(optional)
*