The Slacker's Guide to HTML
Sitemap

HTML Guide - Home
  • The Basic of HTML
  • Total Text Manipulation
  • Images and Lists
  • Links and Forms
  • Tables and Frames
  • Adding Sound, Refreshing, Guestbooks, and more..

  • Style Sheets Guide
  • Properties
  • Selectors
  • Values
  • Measurement

  • Interactive Tag Reference

  • Free Downloads (Editors, Validators, Debuggers, Link Checkers, More)

  • Browser Downloads & Reviews

  • Tips and Tricks in HTML

  • Web Site Promotion

  • Page Layout w/ Tables

  • Gif VS JPEG

  • Resources

  • Friends

  • Link to This Site

  • Email Me

    <-- Back to HTML contents

    Click Here to Tell a Friend about The Slacker's Guides!
    get this gear!



    CONTENTS

    Images

    Images are nice. Images take up space. Images can take time to download and view. Images can be pretty. Images can download fast and without problems. Images can be maps. Yup, they can. Images can be broken and images can be ugly. Worst of all, images can be steriotypical "please send me email"-type crap that someone obviously stole off some chump who stole it from some other chump who stole it from the original chump who used such an ass-ugly picture in the first page. I wouldn't leave mail for that person just out of principle. That's all I have to say about images. Let's get started.

    < i m g s r c >

    The image tag is used to "call" an image file from a computer that is storing it. If you are using Geocities then your images are stored on their drive, and the address of that image is something like http://www.geocities.com/SomeWhere/Jello/1436/myimage.gif.
    If you are using another server, primarily one that gives you the option of folders and subfolders, then the image name is different. Images are one of the few "essentials" to a good web page. If you do not have any images on your page, then frankly, you're page probably sucks. Sorry to be so upfront about all that, but it's usually true (note the word "usually"). The idea of how the HTML for an image works is really simple. Here is the HTML:
    <img src="imagename.extension">

    Now, on to explaining that. Where it says "imagename", you would put the image's name and location (location is relative to the hard drive you are on). If your page is on being stored on a free server, like Geocities, then you simply have to specify a name for the image. If your image is in a folder, then you must specify which folder it's in in relation to where the page is. If the image is in folder "red" which is in folder "blue", and the image is titled "dog.gif", the link would appear like this:
    <A HREF="/blue/red/dog.gif">
    Not too difficult, right?
    OK. The ".extension" part of that source code is where you you include the file name's extension. It will most likely be a ".gif" or a ".jpg", but it could be something else, depending on the graphics program used to make it.

    Image width & height

    Including the height and width of an image is a very good idea if you're serious about your web pages look. Let's assume that you are using an image that says (rather steriotypically) "mail me". Now let's also assume that the image comes up "broken". In that case it would appear the default size of a broken image, which is probably not the size of the image. Now, not only do you have an ugly default broken image box, the image is mis-sized and no one has any idea what the image is supposed to be in the first place. Here is an example of a broken image with no width and height applied to it:
    I'm broke
    Here is an example of a broken image with a specified height of 100 pixels and a width of 100 pixels:
    I'm broke X 100

    See the difference? While it might be bigger and therefore uglier it doesn't set off the layout or any text in it's area. That's not all, though. Yup, there's more. The image height and width tag also help the browser to load the image up faster since it now knows it's dimensions. You might want to hit reload and test these two images to see which one comes up first:

    This one includes the width & height tags No width & height tags here

    Can you tell the difference? I hope so, because if you can't the whole part of that lesson is shot right to hell. And the sad part is it should work. Hit reload and watch. I'll cross my fingers. The width and height tags are included inside the brackets with the rest of the image tag. Here it is:
    <img src="imagename.extension" width="###" height="###">
    Can you dig that? The best way to find out the width and height of an image is to use a program like Photoshop or Paint Shop Pro. If you have neither and your conscience prohibits you from obtaining pirated software, then simply put the image on your page without width and height included, go to the image, right-click on it, and pick "view image" (if you have Netscape. If you don't have Netscape then you should right-click anyway, save it, and open it and maybe the program that views images by default will tell you the width and height), and then the image will load up as a seperate page. Look in the title bar and it will list the height and width.

    Thumbnails

    Thumbnails are images warped by using the width and height tags. That's all they are. If you have an image that is big and uses up lots of load time and space, then make a thumbnail so the visitor can click on it if they wish to see the full-sized version. We'll use my ID picture again for this. Let's say I didn't want to make my poor visitors with ADD or real short attention spans or whatever have to wait, then I would do this:
    <img src="images/yukyuk.gif" width="78" height="100">
    The result of that would be this:

    You simply turn that image into a link and you got a clickable thumbnail.

    Actually, let me just come clean for a second:
    The real way to make thumbnails is to load a smaller image onto the server space and have that link to a full-scale version with a image tag inside the link tag. That way, the image will load faster and people being subjected to viewing several thumbnails at once won't have to wait a long time just to see mini-pictures. Only if they want to view the full-scale, bigger file image would they click on the link.

    < a l t >

    The alt tag is used so that broken images still serve a little bit of a purpose. It creates a text box when a pointer goes over an image. This will also work even if the image is not broken. Here is an example:
    Remember this frog?
    And that frog thing was made with this HTML:
    <img src="images/yukyuk.gif" alt="Remember this frog?">
    HTML tags do not work in the alt boxes.
    You can use a title tag to attatch these boxes to text. Look:
    <a href="yahoo.com" title="YAHOO!">Yahoo</a>
    That HTML does this:
    Yahoo

    < i m g a l i g n >

    Aligning images is done the same as text. The only difference with the alignment tag for images compared to text alignment is that you don't need a closing tag. Here is an image aligned to the right:

    That was bunged up like this:
    <img src="images/modelmammalsmall.gif" align="right">
    Ever so simple. As with text you can also use the center or left commands. When it comes to centering, though, the "center" tag is the easiest to use.

    < c e n t e r >

    Centering images, like aligning images, is done the same as with text. I'm not gonna waste any time on this. Here's the HTML, and following that is the example:
    <center><img src="images/moddelmammalsmall.gif"></center>
    And here's the example:


    Next topic.

    The default image thing

    The default image box appears when your HTML calls an image that your browser cannot find. In most cases that means that you screwed the HTML up. Check and double-check.

    Image maps

    Image maps are images that have "hotspots". Each of these hotspots have a different link to them. So, by clicking on different areas of the image you go to different places. Sounds simple. It's not.
    Let's use this HTML as an example:
    <map name="yukyuk">
    <area shape="rect" alt="YAHOO!" coords="5,5,46,90"
    href="http://www.yahoo.com">
    <area shape="circle" alt="Infoseek" coords="88,37,26"
    href="http://www.infoseek.com">
    <area shape="polygon" alt="Webcrawler"
    coords="67,70,141,57,52,100,67,71,67,71,69,71,71,69,
    71,65,59,69,71,70" href="http://www.webcrawler.com">
    <area shape="default" nohref>
    </map>

    Look scary? It is. Go here and find a program to do the work for you. That's what I do usually.

    Lists

    There isn't that damn much to say about lists. It's hard enough to try to make this stuff even remotely interesting, but lists are pretty easy to understand. They list things. That's all.

    Bulleted lists

    Bulleted lists are very useful. Not only are they stylish, they are attractive. If you have a list of things or a table of contents, or anything, you can use a bulleted list to enhance the way you display that information. Bulleted lists have two elements in them, and the role each element plays will make sense to you when you see how a bulleted list comes together with the use of just a few tags.
    Here are the tags used in a bulleted list:
    <ul> is the opening tag for a bulleted list.
    <li> is the tag for a bullet to appear.
    </ul> is the closing tag for the list.

    Now I will show you a list and following that list will be the HTML used to make it.

      Shopping list
    • Fruity Pebbles
    • Bananas
    • Toilet Paper

    And here is the HTML for that list:
    <ul>Shopping list
    <li>Fruity Pebbles
    <li>Bananas
    <li>Toilet Paper
    </ul>

    Well, that concludes or section on bulleted lists.

    Numbered lists

    A numbered list is the exact same as a bulleted list except for the fact that numbers appear running up the left instead of bullets. Even the HTML is almost identical. Here is an example of a numbered list, and after that will be the HTML:

      Shopping list
    1. Cocoa Pebbles
    2. Apples
    3. Paper towels

    And this is the source code for that list:
    <ol>Shopping list
    <li>Cocoa Pebbles
    <li>Apples
    <li>Paper towels
    </ol>

    OK. And that finishes up numbered lists.

    Definition lists

    Definition lists are lists in which the text being "definied" is not indented, and the definition, or explanatin of that text, is indented. They are very nice looking, and you will see them being used on a lot of pages on the web. They are most often used for linking to things, in that the link is un-indented but the definition and description of that link is indented below it into a small paragraph.
    Here is an example of a definition lists:

    Webmonkey
    A great guide to HTML, almost as good as mine:-)
    C|NET
    An Internet technology resource site.

    And here is the HTML for that list:
    <dl>
    <dd><A HREF="http://www.webmonkey.com">
    Webmonkey</A>
    <dd>A great guide to HTML, almost as good as mine.
    <dt><A HREF="http://www.cnet.com">
    <dd>An Internet resource site</A>
    </dl>

    Now I will explain what the different tags in that code stand for or mean or whatnot.
    <dl> stands for "definition list" and is the opening tag.
    <dt> is the tag placed before the thing to be "defined". It means "definition term".
    <dd> is the tag placed before the "definition" and that means "definition data".*
    *The meanings of 'dt' and 'dd' are thanks to Laurel.
    </dl> is the closing tag.
    And that's the end of the explanation of definition lists.

    You have now completed Page Three of this guide and have hopefully learned all of the text tags, the image tags, and the tags used to create lists. Click on the button below to continue, please, or you might want to go to the top of the page again? Do ya'?


    Continue -->

    | Back to Top of Page |

    Related Links





    Gif or JPEG? Discuss When and Why to Use Each.

    Excellent Freeware RGB/Hex Conversion Program: Convert Colors to Code Easily.