Sunday, April 16, 2006

Web page structure - the beginning.

Here's how it all begins. Once you have chosen a DTD (document type definition), you will add several things called tags to your page to layout the page for you to begin inserting html or xhtml code giving your page a distinct look.

Let's build from the last post. I am going to use notepad for this demonstration, but remember, any text editor that doesn't insert any special formatting codes will work.

<?xml version="1.0" encoding="utf-8"?>
<!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>

<title>Insert your page title here</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
</head>

<body>

<p>---Create Your Page In This Area---</p>

</body>
</html>


Where the <p> tag is used above, can also be used a <div> tag. I try to use <div> tags wherever possible for page layout and design.

No comments: