WEB DESIGN TUTORIAL 7::: CHOOSING BACKGROUND AND FOREGROUND COLORS




Applying a Background Color
To specify a background color for an entire page, insert the style=”background-color:
color” attribute into the opening <body> tag. For example, to make the background of
an entire page yellow, use the following:
<body style="background-color: yellow">
You can use the color name, the RGB value, or the hexadecimal value. Therefore, the following
are equivalent to the code just shown:
<body style="background-color: #FFFF00">
<body style="background-color: rgb(255,255,0)">
Applying a Foreground Color
The foreground color is the default text color for the page. You can set the foreground
color by using the style=”color: color” attribute. It can be combined with the attribute for
the background color in a single style= statement. For example, to set yellow text on a
navy blue background, use the following:
<body style="background-color: navy; color: yellow">
Specifying a Background Image File
A background image appears behind the text on a page. By default, the image is tiled to fill the page and scrolls with the page.
Unfortunately, there are plenty of examples of ineffective or distracting backgrounds on the Web. Here are some tips for making yours better than those:
Choose images that are designed to be tiled so that each copy blends smoothly into the next. When the image’s edges blend well, it will look like a single, large image. In the following figure, the edges do not blend well:
in the opening <body> tag, as you did for foreground and background colors in the preceding section. For example, to use the background image file called granite.gif that is located in the same folder as the HTML file, you would write:
<body style="background-image: url(granite.gif)">

 
Share on Google Plus

About Unknown

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment