|
|
Body AttributesThe attributes of the body tag are one of a kind, and most don't work on other tags. Most, if not all, of these attributes can be avoided by using CSS, but until you get there, these attributes will be very helpful. The first body attribute I will mention is the background color. This makes the background of the page appear in any color you would like. Be very careful not to make the background clash with the text, such as using a dark blue background with black text, or even worse, using black for both. The "bgcolor" attribute is the one used for this. <html> Note that you can also use hexadecimal codes for this as well. In fact, anywhere you can use a normal color, you can use a hexadecimal color code. <html> Your text can be colored the same way. The attribute used is simply "text". Again, you can use either the name of the color, or the hexadecimal color code. <html> The color I used is "FFFFFF", which is white. Note that this wouldn't look too good on a web page, and it may even hurt your visitor's eyes. Try not to use the bright colors too much, as they can be hard to see. Sticking with a black text on white background or white text on black background color scheme is a good idea, until you've experimented a bit and learn which color combinations to avoid. Now we get the privilege to look at another aspect of links - coloring them. There are two elements you will probably want to look at: the normal link, and a link that has been visited before. The normal link is colored with the "link" attribute, and the visited link is colored with the "vlink" attribute. <html> Finally, we get to put images into the background of your site. They will usually repeat and cover the entire page, unless you use CSS on the body tag to make the image repeat only on the X or Y-axes, or not at all. That comes later in CSS though. The attribute for the background image is simply "background". <html> This example ends up as a fairly bizzare page, I'm afraid. All I've added is a bit of text and a link to show the effect of the styling. This is an example of how not to make your page. When you view it, you can see the blue background color. This is because my logo is transparent. With an ordinary picture the background would be covered by the repeating image. We are finally done with the basics. You can make a simple webpage with these tags. Next, we go more in-depth and learn some more advanced HTML. |
©WengerEnterprises.com - All Rights Reserved
Privacy Policy
WengerEnterprises