| ||||||
Main Page Basic HTML Advanced HTML Images Frames Tables Forms Geo Quick Help META Tags Page Tips ASCII Codes Color (Hex) Codes Links Webrings What's New Contact Me Feedback Form Help Forum |
Adding Images to Your Page The first step in adding an image to your page -- even before you add any code -- is to upload it to the directory your homepage(s) are on. (See my section on uploading for more information.) Once this is done, you're ready to add the code. I'm going to use an image for an example. (I'll be using this image throughout this page also.) The image's name is Flwer4.gif, so you'd add this image into your page with the following: <IMG SRC="Flwer4.gif">
And here's how it would look: Now, Yahoo! GeoCities allows you to upload files and create pages in subdirectories. Sometimes this is easier, so you can put all your images into a directory called Images. If you had a subdirectory called images, you would use this code instead: <IMG SRC="Images/Flwer4.gif">
That's it! I know, I know, you're probably thinking it seems just too simple. Ok, I have to admit, although that is the basic code, there are tons of attributes that can be added to this tag. The next sections will go more into depth with this. Note: Make sure you spell your image name correctly and also use the proper capitalization! Errors of those types are the main reason why an image won't show up properly. For instance: pic.gif Pic.gif pic.GIF and PIC.GIF would all be considered DIFFERENT images. Back to index Image Attributes This section will discuss some of the attributes used in combination with the image tags. The attribute being discussed in each section will be displayed in red in the examples.
Back to index Aligning Images ALIGN's elements are LEFT, RIGHT, CENTER, TOP, MIDDLE, and BOTTOM. These attributes would be added the same way the attributes in the last section were. Let's see some examples with our trusty old daisy image: This image is aligned left with the text. You'd add ALIGN=LEFT to your image tag to do this. This image is aligned center with the text. You'd add ALIGN=CENTER to your image tag to do this. This image is aligned right with the text. You'd add ALIGN=RIGHT to your image tag to do this. This image is aligned top with the text. You'd add ALIGN=TOP to your image tag to do this. This image is aligned middle with the text. You'd add ALIGN=MIDDLE to your image tag to do this. This image is aligned bottom with the text. You'd add ALIGN=BOTTOM to your image tag to do this. Back to index Images as Backgrounds You can use ANY image (well, at least any image in internet suported formats) to make a background. For instance, click here to see the daisy image as a background. In order to make the daisy image the page's background, add BACKGROUND="Flwer4.gif" to your body tag. (More on body tags.) Here's a sample of what the body tag would look like: <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#008080" VLINK="#0000ff" BACKGROUND="Flwer4.gif">
One thing you should take note of: not all images are suitable as a background. For instance, although I chose to use the daisy as an example, it would hide a lot of text if you choose black as a text color. Basically, test out your backgrounds before you publish them to the internet. (Of course, you should always test a page out before publishing it anyway!) Back to index Image Links This section will show you how to turn an image into a link. An example of this would be the sidebar on this page. If you click one of the white buttons, it takes you to the page described on the button. Let's use the daisy picture once again. (I bet you're all sick of that daisy by now...) Now, let's say I wanted to use it as a link to Yahoo! GeoCities. I would then combine the tag to put an image on a page with the tag to make a hyperlink. (More on hyperlinks.) The tag would look like this: <A HREF="http://geocities.yahoo.com"><IMG SRC="Flwer4.gif"></A>
Notice how the tag for the image is surrounded by the hyperlink tag. The output would be this: If you click on the daisy above, it will take you to Geocities. Note that there is a border around the image. If you remember the section above on image attributes, by default, a linked image has a border. To get rid of this border, simply add the BORDER=0 attribute to the image tag. Back to index | |||||
Webmaster is a Yahoo! GeoCities Community Leader in the neighborhood of Hollywood. Please email me at knarrly@yahoo.com if you need help with your homepage, or Yahoo! GeoCities in general. Community Leaders are always glad to help! Please visit Hollywood's pages made by your CLs: Hollywood's Community Center and Hollywood's Committees and Special Events Center. Most graphics and headers were made using Paint Shop Pro. Please do not take any images off these pages without my permission. If you are looking for a logo or header for your own website, use the request form at Graphics Source. The webmaster is not responsible for any banners that may appear on the GeoGuides or LinkExchange banners on these pages. I am not endorsing any ads that come up in the banner rotations, and my apologies in advance if anything comes up in them that is unsuitable for younger audiences. Thank you. |