HTML and CSS Reference
In-Depth Information
3.
Add document head and body.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
</head>
<body>
</body>
</html>
4.
Add the document title. Similar to the example discussed in the previous section,
metadata, base URI, links, and scripts can be added arbitrarily.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<title>Sample XHTML5 document structure</title>
</head>
<body>
</body>
</html>
5.
Add the character encoding declaration.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<title>Sample XHTML5 document structure</title>
<meta charset="UTF-8" />
</head>
<body>
</body>
</html>
In XHTML5, the character encoding declaration is terminated with the shorthand notation, which does
not apply to HTML5 where <meta charset="UTF-8"> is used.
6.
Create the structure with a header, section, and footer.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<title>Sample XHTML5 document structure</title>
<meta charset="UTF-8" />
</head>
Search WWH ::




Custom Search