Making a Div Layout - Part two
April 24th, 2008
To follow this tutorial please start by reading Making a Div Layout - Part one
To authorise document is HTML or XHTML you must place the below code, you cannot validate it without the code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Start of the html
<html xmlns="http://www.w3.org/1999/xhtml">
Here is the
<head> </head> this is where things like <meta> <title> <link> (that brings in stuff like the style.css), <script> and so on go in between.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Making a Div layout</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
Edit the “Making a Div layout” to whatever you want to call it, most people place the name of the site here.
<title>Making a Div layout</title>
This brings in the style.css meaning you don’t need to add .css code in the index.html. Great if you are running a site with lots of pages; all you have to do is add this code in each file in between
<head> </head> remember that the name of the .css is to be the same name you have place in the href="style.css"/>If you have your .css file in another folder then change the
href="style.css" to href="Name of folder/style.css"/>.
<link rel="stylesheet" type="text/css" href="style.css" />
<body> Now this is where you will be working in the most; all tags, code for your layout and content goes in between
<body> </body>
This is a Must, it will close off the index.html
</html>
Think of the file as a book
The beginning
<!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>Making a Div layout</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
The Middle
<body> </body>
The end
</html>
So this is the end of part two, to learn more about HTML check out these sites HTML Tutorial and World Wide Web Consortium. Well in part three we will cover the div tags.
Making a Div Layout - Part one
Making a Div Layout - Part three
Making a Div Layout - Part four
Making a Div Layout - Part five
Tags: div, How to make a div layout, html, tutorials