|
|
|
Published : October 25, 2006 |
Author : haui
Category : Startup Guide | Total Views
: 407 | Unrated
|
|
|
| |
haui
Hi Folks, we bring you here tons of tutorials writen by great webmasters and collected them over at Netpond.com
|
|
|
|
Lesson 3 - Html 2
Now you have a basic understanding of what an HTML document is.... but how do you go beyond that basic page? Well, before you even begin to build, you should think about what you want on the page. How do you want it organized? Who will visit your page? What will they expect to find on the page? How will they navigate between pages? Will you connect/link to other pages? What colors will you use? What kind of images? What kind of font (you might even be asking --- "what is font anyway")? All of these things need to be considered before you start to build a page. There's even more, but the "more" is related to design issues and I'm going to stick to the basic HTML document structure for this short tutorial. Once you understand how to build a page, then you can start to experiment with design.
To begin with, we're going to discuss what goes inbetween the <BODY> and the </BODY> tags. This is what makes up the majority of the page. The <BODY> tag itself can have attributes. That is, we can tell the browser we want the BODY background to be black or white or whatever color we like. To do that we specify a color attribute for the BODY tag like this <BODY BGCOLOR=white> or like this <BODY BGCOLOR="#FFFFFF"> The attribute has a value, in this case the value is "white." This makes the background color (BGCOLOR) "white." Note, in the first example, I used the word "white" and in the second example I used the hexidecimal value for white which is #FFFFFF. Either is okay. Attribute values are usually enclosed in beginning and ending quotes. The rules for using quotes with attribute values are as follows:
No Quotes --- It's okay to not use quotes only if the attribute value is a word or a number using the letters a-z or numbers 0-9, the special characters hyphen (-) or period (.) For example <BODY BGCOLOR=white> is the correct way to leave out quotes.
Must use Quotes --- You must use quotes when the attribute value contains several words separated by a comma and/or if it uses characters other than the hyphen or period. For example <FONT FACE="arial, sans serif"> is the correct use of quotes.
Personally, I use quotes all of the time. Why? Because if you leave off an ending quote or misuse a quote, the browser will be confused and you will end up something you hadn't expected and have to spend time debugging your HTML tags. A simple omission can be a headache. Therefore, I just do it.
Okay, now you have the background color and you're ready for the rest of the body. To add stuff to your page you use the following tags after the opening BODY tag:
The Break tag
The break tag <BR> is an important one. It is a stand alone tag and does not require a closing/ending tag. It allows you to put space in between lines of text and/or images. For example, here is a short poem that I have coded without the <BR> tag.
Roses are red, violets are blue, sugar is sweet, and so are you.
Here is the same poem using the <BR> tag
Roses are red,
Violets are blue,
Sugar is sweet,
And so are you!
You can see that in the first example the words ran together one after another because in coding that line I did not use the <BR> tag, but in the second example I did use the tag and the browser interpreted the code, broke the line and started each sentence on a new line with each <BR>. You cannot produce a line break by just using a carriage return on the keyboard, you must use the <BR> tag !
The Header tag
Not to be confused with the <HEAD> tag, this is the "HEADER" tag. This is not a stand alone tag. The text you want in your head must go between an opening and a closing tag. The header tag creates a line of text that is of a particular size. I almost never use these. Here are a few examples:
<H1> produces
THIS
<H2> produces
THIS
<H3> produces
THIS
The Font tag
Fonts? Fonts are text, too. Using the font tag you can define the name or "face" of the font, the size, and even the color. I use this more than the HEADER tags. The font tag looks like this
<FONT FACE="arial" SIZE="3" COLOR="RED"> THIS </FONT> and produces THIS
The Anchor tag or Linking tag
This is called an "anchor" tag. It's used to create links to items within a page, to other pages, to other websites, or to create an email link. The code looks like this
<A HREF="http://www.netpond.com">Netpond Resources</A>
and produces this
Netpond Resources
An email anchor tag looks like this
<A HREF="mailto:you@yourISP.com">Your Name Here</A>
and produces this
Your Name Here
The Image tag
The Image tag is like magic! It's the tag that makes images appear on your web page. To display an image, the tag looks like this <IMG SRC="trc468.jpg">
You can create a link with this image by placing it inside an anchor tag <a href="http://www.welikesex.com"><IMG SRC="trc468.jpg"></a>
|
Click Here To Discuss This Or Ask Questions On The Netpond Message Board! |
|
|
Visitor's Comments ! |
|
|
|
Random Pick |
Calculating Bandwidth -- article by
Sexco |
|
|
Statistics |
| » Total Articles |
94
|
| » Total Authors |
15
|
| » Total Views |
97408
|
| » Total categories |
13
|
|