So, you want to know what you can do with html.. right :)
You've come to the right place!
There are some rules to bind yourself to when you want an optimal coded site.
Now this is a lot of work, so why do you want that in the first place?
Well:
Lastly: I use a .php extention in my examples. This is because in the end I'll split to header.php, page.php and footer.php. If you want to preview a .php extention page on your own pc, then you need to install Apache, PHP and optional MySQL. That is not easy at all. I have an old tutorial which explains it. but it is based on old files, so it probably won't work. So if you want to install your own 'localhost' you'll have to google it to find out how it works, don't ask me as I have begged Ruben to install it for me ;) LOL (mainly php is the bitch). You can also easily save your file as .html the whole time you're coding it (during this tutorial). You won't need php files untill step 10. At that point you can just 'save as' and use php.
Ofcourse this is your own creativity. But since my tutorial is based on my layout, I'll show you mine:
![]()
Note that I saved it as a PSD file. Every single element in my psd is a single layer. I could have like 100 layers in there... When I make my images, I make the layers I don't need invisible. But I do need them later on in my coding, to define sizes and distances.
So this what you see, is indeed my PSD file. I haven't coded anything yet.
Since I build a couple of sites, I've made a 'Developement' folder in 'My Documents'. In there I've got all my sites.
How you call yours, is your choice :)
OK, so in my 'Lostininnocence' folder I make the same setup as I will on the net. For now it contains 2 folders and a file:
images, static and index.php
And in static I make 3 folders: css, img and js
the 'html' templates are usually made dynamic while static = unchangeable.
So in there you put your css files, the images of the site itself (not the art but the backgrounds and all), and the scripts.
The 'js' folder stands for 'javascript'. There's a good chance you aren't going to use it. So you don't have to include it and ofcourse you can always add or delete it later.
Now you've made your layout and setup for the folders, you'll need to make the images to build the site.
Now I know that many people just make an image of the total layout and put them as background, then position layers on top of them... That might be easy to begin, but it's not efficient in the end. So... what do you do? Make seperate images.
So you have to decide where to cut your image and where the lines are.
In my example it'll look like this:
![]()
And so the images are like this, saved in the 'static/img' folder:
and
For the menu I made these images:

This is because I want a mouseover in orange for my navigation. And because the font I chose isn't regular, I made images for them. So one image for 'on' and one for 'off'.
So now your folders will appear a bit like this:

(I've also included my existing art system in this example already)
Now the real work starts... :)
I use Ultra Edit for my coding.
So, my fist code looks like this:

Okay, the real coding starts now. And this is when you'll find out an editor like Ultra Edit is really handy.
Because you'll switch back and forward between your index file and the CSS files.
I start with the index.php. Think how you're going to build it. In my example the topbanner has to be first. Then the left banner should be left, content in the middle and the right part on the right.
So you'll make several div layers after eachother.
The code for a div layer is: ‹div id='name'› or ‹div class='name'› (The difference between class and id I'll explain later)
The first one I make, I call 'frame'. Later, in the layout.css I'll give it a width and a height and a margin.

Now frame is something you will have to make aswell. It's easy to use when you want your layout centered, or to have another color as background there than around it. Don't confuse the name 'Frame' for the frames you could also make as a code (iFrame). It's just a name ;-)
In frame, between ‹div id='frame'› and ‹/div› I'll make the id topbanner, I'll call it 'top'. It ends immediately because all the style for it will be in the stylesheet and the only content, i'll add later. (the stats).
Ofcourse this part can be different for you. I build my layout like this, but yours has probably a different setup, and so the order and the amount of needed div layers can be totally different. Maybe you only need 1 for top and then 1 for content.
Then I'll make the id 'left', because the left image has to be for the other two. both 'top' and 'left' will have a 'float : left' in the stylesheet, this is to make sure that they'll go after eachother. And because 'frame' is only 1024 width, it'll come under eachother (it has no more space on the sides).
Now the id 'content'. I'll give this one a bit more space in my setup, because I know I'll have to add a lot in here later.
And lastly I'll add id='right'. Also these last two layers have a 'float : left' in the stylesheet, to make sure they come after eachother.
As said before, I'll have to add a lot into the 'content' so I'll start with the two obvious ones. 'nav' for the navigation and 'main' for the updates and content.
So my coding now looks like this.
Now ... let's take a look in the explorer what we've got here.
Pretty huh... totally white... yep, because we didn't make the stylesheet yet. We only decided how we're going to make that.



Looking at my psd file, the navigation should be 8 pixels above the 'main'. So, I make a navigation.css and give it a width and a height...

I've also given this div a red border of 1 pixel. That's because at the moment it's empty, and this way I can see if it's at the right place and the right size.
My site now looks like this.
So now I've got to make the links in them and write this code:

which gives this result.
The images are not next to eachother and they have a border. It's because I've given those qualities to the images of a link. So now I need to go back to the navigation.css to give the images in 'nav' different qualities. When I change that, and remove the red border, there's still too much space, so the last link is still on the next page.
So I remove the 'enters' in my code and put all the navigation links on 1 line, without spaces.
![]()
(I've put on the Toggle Word-Wrap, to see the whole code on several lines, while they are just one; see red arrow.)
Navigation.css now has this code:

And the site now looks like this:
![]()


So as you can see, the block is in the neighbourhood of where it should be. All it needs is some margins. I look at my PSD and mesure them. 18px from right and 7px from the top. So I add margin : 7px 18px 0 0; to the CSS.
And now it looks like this.
So I'll add the code for the statistics (from Smurl).
And now it looks like this.
As you can see, the font isn't how I planned in my PSD. So I add font specifics to the CSS.
And because I want the text to be a bit away from the lines, so I add padding, but padding has influence on the sizes, and so I need to adjust them aswell.
I end up with this code:

And the result is this.





Okay, if you look at my PSD, you'll see some 'special effects'. Like the fading images for recent art. A mouseover for the navigation and light-transparent backgrounds.
How do we do those?








So, the layout is mostly ready and so now it's time to lay-out the content! Just like all previous steps, I work here with div layers.
Also, in the stylesheet you can give specifics to a P or an IMG or a heading, anything.
So I start with the H2 and H4 and the P (because I've been using them in this tutorial, lol)

The new margins to the P create nice distances in my text, padding and all. Plus now my H4 has a color in stead of being black. Highlight colors are always important as they draw attention. Now I was gaining for blue, or something good contrasting, but well, I didn't find those suiting in the layout :(. So this brownish color it is.
Now if you want borders around your images at one page, but not at the other, you can easily do that by naming the class or id different. For example you have a class called art and one called update.
You want the images in art to have a black border and those in update red.
So you do this:

Ofcourse the same goes for margins and all other specifics :).
This is also the time to put all kinds of other specs in. Like if you take a look at SP, you'll see the updates with borders and other specs.
![]()
The code for that is the following:
The coding on the index page looks the same every time, we can just edit the content:

You'll notice I've used in the class Update several variations like span and blockquote. In the CSS I've addeds specifics in both those and to the IMG, the A, the heading in the span, etc. etc.
So that coding looks like this:

Now this can be a pain... lol.
There are people using other browsers, like Mozilla/Firefox or (worse) Safari or (worst) I.E. 5 (for mac! EEEEK!)
Before they might have had no problems with your site, but now you've worked with margins, they are defined different by other browsers. So if you download those browsers and install them on your pc, you can test your site in those browsers.
Well, remember my screenshot (not too bad btw, I've had MUCH worse): Mozilla... As you can see, the margins are not right. And I explained that that was because I used a position : absolute. Now I can fix this with a simple hack in CSS.
In the CSS you have to use !important wich is read by I.E. as 'not important'. Meaning that I.E. won't read it. So I define my margin for Mozilla and put the hack behind it. Then I apply a margin for I.E. aswell, which I set to 0, as that was good.

And now in Mozilla (and probably Safari), my site looks good aswell.
Mozilla and Safari use the same hack. If you need to change something only in one of them, you'll have to google something like: 'CSS hack safari not mozilla'
For older browsers like I.E. 5 and 5.5 you can hack by using a \ in the word for I.E. 6.
I.E. 6 can read the word then, but the older browsers not. So if the margin for I.E. 5 would need 10px and I.E.6 nothing, you would have this in the end:

Same goes with wid\th, heig\th, etc.
Fixing all margins can be a pain... but in the end you'll get it and it'll be worth it :)
Now it's time to split the file we made into 3 parts:
The top part that will be the same for each page is header.php.
The middle part with the specific content for the page will stay the index.php and then the last part with the same content on each page at the end will go into footer.php.
So for me that means, everything up to the div text, will be in the header.
![]()
Resulting in a header looking like this:
![]()
And for the footer I only need this:
![]()
So I start making a new page now, like 'art.php' and I only have to start with this:
If you worked with your index file as a .html document, don't forget to change it to .php otherwise it can't read the php commands.
And that's it folks!
Good luck!