STYLE SHEET SYNTAX EXAMPLE
Here is an example of how the CSS syntax is use and what the results are:
CSS SYNTAX
<HTML>
<TITLE>CSS Tutorial</TITLE>
<HEAD>
<STYLE TYPE="text/css">
H1 { text-transform:uppercase; color: red;
border-width:4pt; border-style:outset;
background-color:yellow; padding: 4pt;
font-family:verdana, arial;
border-color:red;}
</STYLE>
</HEAD>
|
|
STYLE SHEET USE
<BODY>
<H1>This is the H1!</H1>
</BODY>
</HTML>
|
|
This is the H1!
To explain a bit about the various properties above:
- text-transform:uppercase- all letters are capitalized.
- color: red - text color is red.
- border-width:4pt - a 4 point border is used around the text.
- border-style:outset - a type of 3D border.
- background-color:yellow - the background color is yellow.
- padding: 4pt - a 4 point padding is placed around the text.
- border-color:red - the border color is red.
