|

|

"Love is the immortal flow of energy that nourishes, extends and preserves. Its eternal goal is life!"
|
Email Me
Design by
Serenity's Graphics
and My Arts Desire
|
|
Basic HTML: Tutorial #2
Hello and welcome to day two! No doubt you've attempted to write a small document on your word processor and save it as TEXT for MAC or ASCII TEXT DOS or TEXT for your PC. You also remembered to save the document with the .htm or .html suffix, I'm sure. Good, now let's move on to today's lesson, for today we write!
|
HTML Tags
HTML works in a very simple, very logical, format. It reads like you do, top to bottom, left to right. That's important to remember. HTML is written with TEXT. What you use to set certain sections apart as bigger text, smaller text, bold text, underlined text, is a series of TAGS.
|
|
|
Think of TAGS as commands. Let's say you want a line of text to be bold. You will put a TAG at the exact point you want the bold lettering to start and another TAG where you want the bold lettering to stop. If you want just a word to be italic, you will place a start italic TAG at the beginning of the word and an end italic TAG at the end of the word. Is this making sense so far?
|
TAG Format
All TAG (I sometimes call them command) formats are the same. They begin with a less-than sign: < and end with a greater-than sign: >. Always. No exceptions. What goes inside the < and > is the TAG. Learning HTML is learning the TAG to perform whatever command you want to do. Here's an example:
The TAG for bold lettering is "B". That makes sense. Here's what the TAGs look like to turn the word "Serenity" bold:
<B>Serenity</B> Look At What's Happening:
Some Questions
Q. Is the end TAG for other commands simply the begin TAG with the added slash?
A. Yup.
Q. Will the TAGs show up on my page?
A. No. As long as your commands are inside the < and > marks, the TAG is used to alter the text, but the actual code is hidden from the viewer.
Q. Your bold TAG uses a capital "B". Do all HTML TAGs use a capital letter?
A. The browser doesn't care. In terms of TAGs, capitals and lowercase letters are equal. But I think it would be a very good idea for you to make a habit of writing your TAGs in capital letters as it sets them apart from the normal text. It also makes them easier to pick out later when you are revising the code.
Q. Must everything have a TAG to show up on the page?
A. No. If you just type in text, it'll show up. But it will not have any special look.
Q. What if I forget to add the end TAG or forget to add the slash to the end TAG command?
A. That's trouble, but easy-to-fix trouble. It will be obvious if you've not placed an end TAG when you look at the document in your browser. The entire document will be affected after the point where you forgot the end TAG. Just go back into the document, add the slash, and reload the document into the browser.
Q. Do all HTML TAGs require both a begin and end TAG, like above?
A. No. There are exceptions to the rule, but let's stay on the ones that do require both TAGs to work for now. Moving along . . .
|
|
Open and Close Tags
The majority of HTML Tags do require both an open and a close Tag (a begin and end Tag). Most are very easy to understand because the Tag is obvious. Here are a few and what they do to text:
| Affect |
Code |
Code Used |
What It Does |
| BOLD |
B |
<B>Bold</B> |
Bold |
| Italic |
I |
<I>Italic</I> |
Italic |
| Typewriter |
TT |
<TT>Typewriter</TT> |
Typewriter |
Can I Use Two Tags at Once?
Yes. Just make sure to begin and end both. Like so:
<B><I>Bold and Italic</I></B> gives you Bold and Italic
<B><TT>Typewriter and Bold</TT></B> gives you Typewriter and Bold
If you do use multiple Tags to alter text, make a point of not getting the end Tags out of order. Look at this:
<B><I><TT>Text Text</TT></B></I>
In terms of format, the example above is not correct. The end Tags are out of order in relation to the start tags.
Follow this rule:
Always set the beginning and end tags at the same time, always placing them on the farthest end of the item being affected.
Here, again, is the example above in correct form:
<B><I><TT>Text Text</TT></I></B>
Notice the Bold Tags are on the far ends. Next in line are the Italics and finally the Typewriter Text Tags are closest to the affected text. Just keep setting commands at the farthest ends each time you add them and you'll stay in good form.
|
|
Single Tags
The open and close Tag format dominates the majority of the available HTML Tags, but there are Tags that stand alone. Here are three I use extensively:
You will write the HTML document on the word processor, or HTML Builder, Notepad, WordPad, or Simple Text. When you are finished creating the HTML document, you'll then open the document in a browser, like Netscape Navigator. The browser will interpret the HTML commands for you and display the Web page.
| Tag |
What It Does |
| <HR> |
This command gives you a line across the page. (HR stands for Horizontal Reference/Rule.) The lines above the words "Single Tags" was made using an <HR> Tag. |
| <BR> |
This BReaks the text and starts it again on the next line. Remember you saved your document as TEXT so where you hit ENTER to jump to the next line was not saved. In an HTML document, you need to denote where you want every carriage return with a <BR>. |
| <P> |
This stands for Paragraph. It does the exact same thing as the <BR> above except this Tag skips a line. BR just jumps to the next line, P skips a line before starting the text again. |
|
|
Writing Your First Page
So, here we go . . . you're going to write your first HTML page using what you have learned above plus two other items. And these two items are important to every page you will ever write. Why? Because they will be on every page you ever write.
You will start every page with this Tag: <HTML> That makes sense. You are denoting that this is an HTML document.
Your next Tags will always be these: <TITLE> and </TITLE> See the very top of this page? I mean way up top. Above the FILE -- EDIT -- VIEW menus. The colored bar up there. Right now it reads "HTML Basic Tutorial 2" That's the title of the page and that's what you are denoting here. Whatever you put between these two Tags will show up in the title bar way at the top.
Finally, you'll end every page you write with this Tag: </HTML> Get it? You started the page with HTML and you will end the page with /HTML. That makes sense again.
|
|
So, Here We Go!
I want you to play around with these commands. Just remember that HTML reads like you do, top to bottom, left to right. It will respond where you place the start Tag and stop where you place the end Tag. Just make sure your Tags are within the < and > items.
Here's a sample page to show you what I mean for you to do for your practice:
|
<HTML>
<TITLE> My first html page </TITLE>
<B>This is my first HTML page!</B>
<P>
I can write in <I>Italic</I> or <B>Bold</B>
<BR>
<HR>
<B><I>Or I can write in both</I></B>
<BR>
<HR>
<TT> . . . and that's all</TT>
</HTML>
|
Notice I only used the Tags I showed you on this page. Yes, it's a simple page, but you're just starting out. Notice the <HTML> and </HTML>. Notice the <TITLE> and </TITLE>. See how there's a beginning and end Tag when I alter the text and that the P and BR commands are used to go to new lines?
Look at the program above and then what it produced. Look at the source code when you open the page. See how the HTML Tags denoted where text was affected? Good! I knew you would. Now go! Go into the world -- or at least to your text editor -- and create. Follow the instructions in HTML Tutorial_#1 to help you save and then display your first HTML page.
You Can Do This!

On to Tutorial #3
|
|
|