
Copyright © Rutgers Writing Program
A new blank page will appear with the words “<< CSS >>” at the top. This is a
comment that indicates that you are working with a style sheet. This will have no
effect on the code you will create.
Hand-Code a New Style
Now it’s time to set up some styles of your own.
Body
The first style you should create is one that controls the look of the page itself. To
create the style for “Body,” we’ll be entering new text inside the “BODY” tags in your
new CSS document. After the first “font-family: Arial, Helvetica, sans-serif;” line,
press the “Enter” key to bring you to a new line. You’ll want a background color for
your web page, and this will be controlled in your “BODY” style. On this line, type:
background-color: #CCCCCC;
This will give all pages that have your style sheet attached to it a gray background.
Now, your text will need a size. Make a new line, and type:
font-size: 10pt;
These will be all of the characteristics that the “BODY” style will manage. It is now
time to close the tag. Do this by putting a close brace “}” right after the last line of
code.
Kommentare zu diesen Handbüchern