Well, this is probably the most popular command on the
Internet - the clickable link or the hyperlink. If you have been
on the Internet for more than a day, you have probably
seen zillions of these. Want to go to Yahoo or Google?
So how is that done? We'll just show the code for the Yahoo link. <CENTER><a href="http://www.yahoo.com">Y A H O O</a></CENTER> As you can see, the hyperlink is created with the <a href="web address"> and </a> tags. No doubt you'll want to know how to make a fancy image hyperlink? Just replace the text with an image source tag. <CENTER> <a href="http://www.1728.com"><IMG SRC="1728.gif"></a> </CENTER>
Would you like to put a border aroung that image? Then add this code to the link: Spaces in HTML require special commands. For example, let's take this phrase: That looks "squeezed" so let's put 2 spaces between the words: That still looks too "tight" so let's try 25 spaces between the 2 words: That's right, there are actually twenty-five spaces between the words "MY" and "PAGE" but HTML will display any number of spaces as just one space.
In order to make more than 1 space, we use one of the HTML character entities.
These are special control characters
which are entered into HTML documents in order to display special
symbols. To display a space we use the character entity:   then it will display as this: MY PAGE
Here are the codes for displaying the 3 symbols mentioned above.
<!-- Text that is placed between these two tags will not get displayed in a browser even if the text of the comment goes on for several lines. --> IMPORTANT Always leave a space after the opening tag and a space before the closing tag. We strongly recommend that you use comments in your HTML documents. As you learn more about HTML and other web languages, your files are going to get longer and more complex. Should you want to go back and edit a file several months (or years) later, it may look totally unfamiliar to you.
No doubt you will want to add graphics to your site
to make it look more professional, colorful, interesting, etc.
How can you get graphics? IMPORTANT: When you are writing HTML files on your computer, if you do not have the graphic in the same directory as your HTML file, you will see the infamous broken link graphic or . Similarly if you don't have the graphic uploaded to the same directory as the HTML page that references it, visitors to your page will see the broken link graphic. Incidentally, how do you save graphics to your computer? Right click on the image and save it in the appropriate directory on your hard drive. Remember, some graphics may be the intellectual property of others.
The tag to display graphics on your webpage is:
<IMG SRC="pic1.gif"> where pic1.gif is the
file name of the graphic. If you use the align=left attribute, <IMG SRC="pic1.gif" align=left> an interesting thing happens. The image is still on the left, but the displayed text will wrap around the image. We'll use some asterisks to complete the "text wrap". ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
By using the align=right attribute,
<IMG SRC="pic1.gif" align=right>
the same thing happens except that now the image is
on the right. Again, we'll add asterisks to complete the
example.
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
Using the align=middle attribute,
<IMG SRC="pic1.gif" align=middle> not surprisingly,
does this.
And lastly when using align=bottom <IMG SRC="pic1.gif" align=bottom> the text looks like this.
Well, we have covered a LOT in these 2 lessons of HTML and yet there is
still much more to learn (although you are now off to a
darned good start). If nothing else, use your favorite
search engine to find more HTML tutorials or perhaps
you could even buy a good book about HTML. Yes, not only this webpage but this entire website was written using Notepad™ as the only editor. ________________________________________________________ |
Copyright © 1999 - 1728 Software Systems