A Prayer For You. Jesus loves you.
Using Cascading Style Sheets (CSS) to Specify Web Page Formatting
CSS will enable you to specify all aspects of your web page formatting, such as your web page background color, font size, font color, font face, page margins and much more simply by including special CSS tags between the comments.
Let's start with defining the body of the web page. Using HTML code, this is done inside the <body> tag. But using CSS, it is done within the comment section of the <style> tag. Therefore, there is no need to define anything inside the HTML <body> tag. In CSS, the body tag looks like this: body { }. The information that concerns how the body will be styled goes inside the brackets. The upper portion of your code should now look like this:
| <html> <head> <title>Your Page Title</title> <style type= "text/css" title="styleid" media="all"> </head> </body> |
Next, we define the background color of the page. Colors are defined, in both HTML and CSS with a series of letters and numbers. These numbers are referred to as hexadecimal numbers, and each one represents a color. For instance, the hexadecimal for the color white is #FFFFFF. The hexadecimal is always represented with the # sign followed by a combination of six letters or numbers.
Visit the 216 Safe Colors section to find a complete color code chart.
With CSS, we can define different colors for the background and foreground of our web page. This is done as follows:
| Body { background-color: 000000; color: ffffff } |
Our page now has a black background with a white foreground. However, please note, defining a foreground color is optional. In addition, defining the background color is also optional. This should only be defined if you'd like a background color other than the default color of white.
Anytime you are defining a format in CSS, you must first state what you are defining, followed by a colon, and then the value. If you would like to include additional tags, they must be separated with a semicolon.
In our example, we are first defining the background color. Following the background color is a colon, which is followed by the value (hexadecimal color code). A semicolon is placed at the end to tell the browser that this definition is complete.
back next WapMasters

©CopyRight elektra2006-07®