HTML and CSS Reference
In-Depth Information
4.
Additional namespaces can also be added upon request.
5.
Add document head and body.
<?xml version="1.0" encoding="UTF-8"?>
<!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>
</head>
<body>
</body>
</html>
6.
Add document title.
<?xml version="1.0" encoding="UTF-8"?>
<!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 Document Sample</title>
</head>
<body>
</body>
</html>
7.
Add head content, including metadata, base URI, links, and scripts. Although they are
optional elements, many of them are used frequently. The most common one of all is the
link to an external CSS file:
a.
Create a basic link with the file path or URI. If XHTML syntax is used, self-closing is
required.
<link href="styles/main.css" />
b.
Set the link type.
<link type="text/css" href="styles/main.css" />
c.
Identify the link role.
<link rel="stylesheet" type="text/css" href="styles/main.css" />
d.
Set the media type (optional).
<link rel="stylesheet" type="text/css" media="all" href="styles/main.css" />
Search WWH ::




Custom Search