External style sheet reference - affects any pages that link to it
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" >
LINK tag goes inside the <HEAD>
In the file "style.css" you define all the properties/styles.
You can define the "look" of typical HTML code elements:
body {
background-color: #776f4a;
}
a {
color: #D1C374;
text-decoration: none;
}
h1 {
color: #FFFFFF;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
}
h2 {
color: #FFFFCC;
font-size: 18px;
font-family: Arial, Helvetica, sans-serif;
}
h3 {
color: #FFFFCC;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
td, th {
color: #FFFFFF;
}
Or you can define your own:
The use of ID is appropriate when a style only needs to be applied once in any document.
#footer {
position: absolute;
top: 500px;
left: 160px;
width: 550px;
text-align: right;
font-family: Helvetica, Arial, sans-serif;
}
#content {
padding: 10px;
position: absolute;
top: 100px;
left: 160px;
width: 550px;
}
The CLASS attribute is used to specify the style class to which the element belongs.
.menu {
color: #FF6666;
font-family: Arial, Helvetica, sans-serif;
margin-top: 10px;
margin-left: 20px;
}
Rollover links:
a {
color: #03157E;
text-decoration: none;
}
a:hover{
color: #fff;
background-color: #03157E;
text-decoration: none;
}