![]() |
||||||||
HomeBasicsUsing FlagsMore Text FlagsPlacing ImagesColorsBackgroundsLinking PagesTablesGetting Online |
HTML Basics, Tips and Tricks |
|||||||
PLACING IMAGES
The command to place an image is constant. You'lll use the same format every time. Now might be a good time to talk about where to store everything, because you're starting to call for additional items to fill up your home page. Until now, all you did was put text on the page. Now you're going to place an image. At this point in your HTML career, it's a good idea for you to place whatever images you are going to use in the same place as your web pages. That means place the image right on the same floppy disc, or in the same hard drive directory, as the page that will call for it. Later, to be more organized, you'll want to organize your files into different directories. But for now, just store everything together in the same place. Here's the format for placing an image: <IMAGE SRC="filename.gif"> (or .jpg, or .bmp) By replacing "filename.gif" with "image.gif", the filename of one of my own little pics, you get this...
Here's what happening: There are three basic formats
you will find on the World Wide Web. Each is denoted to the browser by
a different suffix. Free website graphics are literally everywhere. www.clipart.com is a good place to start, and you can find many others just by running a web search (try "website graphics" as your key words). Plus, since you've been surfing, you've seen hundreds of images already. If you see something on someone's page that you really like, ASK to use it. Don't just take it. That's not right, and you could be violating copyright law (yikes!). Just ask. You'll probably get the image. In no time, you'll have a truckload of 'em to use on your page.
First let's worry about placing the image somewhere on the page. The default is justified to the left. If you write an image flag on a page, the image will pop up right on theleft. If you want to have an image placed in the center of the page, you might be able to guess at this point that you'd use the <CENTER> and </CENTER> commands that we just covered. But how do we get the image to the right of the page? Well, how did we get text to the right? By adding the attribute ALIGN="--" to the <P> command, right? Could it be possible to do the same thing here? Why yes, it could. Here's the format: <IMAGE SRC="image.gif"
ALIGN="right"> (now look over there to the right!)
And if you want it centered, it's <IMAGE SRC="image.gif" ALIGN="center">
Changing Image Size Computer images are made up of lots of little colored dots. They're known as picture elements, or "pixels" for short. The numbers that we're about to use in our flags refer to pixels rather than inches, or centimeters, or whatever. To change size, we have to denote how many pixels high, and how many pixels wide, we want the image to be displayed. The pic "image.gif" is 57 pixels high and 57 pixels wide. Let's say I wanted to make it a little taller. Say... 77 by 77 pixels. I say <IMAGE SRC="image.gif" HEIGHT="77" WIDTH="77">, and I get this:
You can play around with the HEIGHT and WIDTH to make pictures as big or small as you please. Just be careful with the number values that you set, because you might end up distorting the image like this: <IMAGE SRC="image.gif" HEIGHT="67" WIDTH="83">
Of course, if you want to be funny, you can distort the image on purpose. Oh, and did you know the WIDTH command also works on the <HR>command? The only difference is that you use percentages (%). Watch: <HR WIDTH="40%"> gives you this: This is <HR WIDTH="70%">:
And that's how to play around with images. See ya in the next tutorial: Colors (this one's short and sweet) |
||||||||