|
Virginia's HTML—Graphics |
If you have permission from the owner of a site, you can easily download any graphic image you see on the Web. For example, you can grab the small mug graphic that is my home page link (permission hereby granted) to start your collection.
|
This is some blah, blah about a mug. <P> <IMG src="graphics/small-mug.gif"> <P> That's a mug'o'java! |
|
This is some blah, blah about a mug.
That's a mug'o'java! |
Now would be a good time to put this mug up somewhere in virginia.html. Note that if you put it in a subdirectory one level below the root, use src="../graphics/small-mug.gif".
You can align images in interesting ways.
|
<IMG align="right" border=0 src="graphics/small-mug.gif"> This is some blah, blah about a mug. <P> That's a mug'o'java! |
This is some blah, blah about a mug.
That's a mug'o'java! |
Most websites specify most images with border=0. Sometimes, though, you want a border.
|
This is some blah, blah about a mug. <P> <IMG src="graphics/small-mug.gif" border=3> <P> That's a mug'o'java! |
|
This is some blah, blah about a mug.
That's a mug'o'java! |
Images also should include an alt="text description of image" tag. There are browsers for the visually impaired that read the text to a listener. For a graphic, your alt= text will be read to the listener. A very important visually impaired thing is the Google web crawler. It can't view your image, but it can look at the alt= description and use it in indexing your page. And if you screw up your website and the browser can't find the graphic, it will show the alt= text instead of the graphic.
In the following example, notice that "small-mug.gif" has been mistyped "small-bug.gif."
|
This is some blah, blah about a mug. <P> <IMG src="graphics/small-bug.gif" alt="small image of a blue coffee travel mug"> <P> That's a mug'o'java! |
|
This is some blah, blah about a mug.
That's a mug'o'java! |
Simple! An IMG is one of the many things that can be placed between <A> and </A> tags. I'd appreciate it if you made that mug on your site a link to my home page, this way:
|
To get to www.MartinRinehart.com click this mug.
<A href="http://www.MartinRinehart.com" target="_new"> |
To get to www.MartinRinehart.com click this mug.
|
Note: When you use an image in a hyperlink it automatically gets a border. You need the border=0 attribute if you don't want a border.
That's it for today. Tomorrow I'll show you how to use frames so your website can look like this one—a title across the top, a left-side navigation bar and a central content area. (Or you could put a title down the side and navigation along the top, or . . .)