|
Here's the code so far:
Dave Kristula's Internet Home
|
The actual page text and graphics are found inside here.
|
Now that we're ready to start our actual page, I'm going to save a new copy of the file as it is, and call it index.html. This name is the name used by most web servers for the main web page.
Now, after saving the page as index.html, I'm ready to start adding the contents of the page.
As mentioned before, I'm going to use a header graphic on every page. This graphic is going to be on all the pages we create for this site, and on the sub-pages it is going to need to link back to the main page. The graphic is 700 pixels wide, and 100 pixels high. To get rid of the colored link around the image, I'm going to add border="0" to the <img> tag. This is a very, very handy trick to remember.
Here's the HTML code for the header graphic and link. It's pretty simple:
Please note that I added an alt tag. This is really handy for people who are browsing without loading images.
Now, after the header graphic, my page is going to have a picture of me on the left, and the text "Welcome to the Internet Home of DAVE KRISTULA" on the right, beside the picture. If you've tried having text next to a picture, you know it doesn't always work right. To make it work right every time, you need a two-cell borderless table.
I'm going to want my picture and text in the center of the page, so I'm starting out with another <div> tag. I want this table to be a little bit snug, so I'm setting its total width to 75%. This 75% means 75% of the table -around- it, not the page, because we used a layout table of 730 pixels. In other words, it's only 75% of those 730 pixels.
Here's the outline for our table:
So what's cellpadding and cellspacing? Cellpadding is the buffer space around the contents of a cell. If you have a cellpadding of 0, everything is bumped right against the edge. Example:
|
| cellpadding of 0
|
|
|
| cellpadding of 3
|
|
Cellspacing, on the other hand, is how far apart each cell is from another cell. Here's two pictures, one with a cellspacing of 0, and one with a cellspacing of 5.
By now you should be able to recognize me on the street! Just kidding.
|