Adding attributes to the body tag.
Several attributes can be added to the opening body tag to alter the appearance of the whole page.
- bgcolor - background color
- <body bgcolor="#000000">
- background - graphic image as bkgd
- <body background="bubbles.jpg">
- text- color of text. Only used in opening body tag.
- <body text="#000000">
- link- color of new links on page, undiscovered territory
- <body link="#000000">
- alink - color of active link when clicked on
- <body alink="#000000">
- vlink - color of visited link, tells viewer they've been there done that
- <body vlink="#000000"&ft;
It would be good to note that in the above example, all the RGB codes are set to black, you would not be able to see any of the text on the bgcolor, however it would all show on the background .gif.If you use textured or graphic bkgd, also select a corresponding bgcolor so if graphic does not load the viewer can still read the colored text. Check contrast of text to bkgd, including link colors. Hard to read will send viewers away. To the Top
Color code in equivalent hexadecimal RGB values. Formula. RGB ranges from 0 to 255. Hexadecimals from 0 to 9 and A to F.
Displays an image rather then a color. Save bkgd images to HTML folder. Rt click image, select save bkgd as, save to HTML
All images must be in .jpg or .gif to show on web.
Not all images will work as solid bkgd. Look for seamlessly tiled images.
Some images are hard to read on.
To view on web, place graphic in same folder as web page file. Upload to server. Uppercase can confuse browser, rename image files to all lowercase including the extension.
*May need to change size of some fonts to look right. Specify up to 3 styles in tag, browser will use the first one it supports. Not all people have same fonts in their computer. Font junkies will have many fonts that most people do not use.
- 1. color= attribute
- Will color text between tags. Use as often as like.
<font color="#000000"></font> - 2.  size= attribute
- Range from 1 to 7 where 3 is default
<font size="7"></font> - 3.  face= attribute
- style of font. Consider carefully. Make sure it is readable.
<font face="Architect"></font>
It is interesting to me the things I have learned today alone! Apparently if you forget to add your end quotation mark in a RGB code the entire background will show as red! I could alter the shade of the red, but I could not get any other color. Why that mistake caused that reaction is peculiar to me. I'm not sure what the proper form is, but this whole page is in "Architect", however instead of making each of my subtopics as a heading (which is what I did on my first 2 pages, not knowing any other way) I created a new font tag for each subheading, closed it and then opened another font tag to continue the page. I did this to change the size of the font. I did notice that I could just add an opening font tag with a size attribute before each subheading and get the same result, but as we are encouraged to add those closing tags for every open one, I changed it hoping I was doing a good thing.To the Top
There are many places to find graphics on the web. Before taking an image and planting it on your own web page there are several things you should consider:
There are only 2 formats viewable on their own - .jpg and .gif. Other types of images require special help. Which format you use depends on what your image is. JPG is better for photos because it can handle a large color span, it is also good for compression of the image as far as "bleeding" of color. GIF is limited to 256 colors and works great for clipart and buttons. It doesn't compression as much as a JPG, but is typically used for smaller images anyway.
To save an image found on the internet, right click it and "save as" to your HTML folder. Any image used on your webpage will need to be uploaded to your server folder, keeping it all together will make it easier to find. A right click on an image will also give you the properties of the image, allowing you to see the dimensions of the image, which is important for inserting the image into your webpage.
<img src>
- Image Source - the filename of the image
<img src="sample.jpg"> width="?" and height"?" attributes
- Measured in pixels
<img src="sample.jpg" width="70" height="70"> alt="description" attribute
- Mouse over description of image.
Very helpful if image is a button or link
<img src="sample.jpg" width="70" height="70" alt="Picture of me"> border="?" attribute
- Always include even if it's 0.
<img src="sample.jpg" width="70" height="70" alt="Picture of me" border="0">
This is an example of an image not designated to a place with text aligned to the middle. When text is aligned to a height but not a "side" the image goes to the left and the text places one line beside the image and drops the rest off to the bottom. I also added a border value of "0" for this one.
Here's an example of an image that is aligned to the right of the text. Here a border value of "10" was included. These are half my "men" at a British Car Show this summer. Okay I also tried to start the text in the middle of the image's height, but can't seem to get the tag to read two separate alignments.
I think that covers all the alignment attributes that we learned. I know there must be more to it then this because I find these options relatively unattractive on a webpage.
To the Top