COMP 10 CSS
COMP 10 CSS
property : value
CSS
<p>from <em>New Webster's Dictionary and Thesaurus</em></p> font-weight: bolder;
</body>
</html>
}
p{
font-size: 80%;
}
h2 {
font-family: Verdana;
}
em {
color:red;
font-weight: bolder;
}
<html>
<head>
<title>Stylissimo</title>
</head>
<body>
<h2><font face="Verdana">Self-Regeneration</font></h2>
<dl>
<dt><font color="red"><b><i>phoenix, phenix</i></b></font>
<dd>a bird of gorgeous plumage, sacred to the sun, reborn from <br />
the ashes of the funeral pyre which it made for itself<br />
when each life span of 500 or 600 years was over.</dd>
</dl>
<p><font size="2em">from <font color="red"
size="2em"><b><i>New Webster's Dictionary and Thesaurus
</i></b></font></font></p>
</body>
</html>
Deprecated Tags and Attributes
Tag Description Replacement
<center> Centers text <p style=“text-align:center”>
attribute
p{
font-family : arial ;
font-style : italic ;
}
Typeface of the Characters
• Font-family = the font that your text will be in
• Font-size
1. Old 7 Size Font System
a. xx-small
b. x-small
c. Small
d. Medium
e. Large
f. x-large
g. xx-large
Typeface of the Characters
2. Larger or smaller – relative to the Old 7 Size
Font System
3. % - percent relative to the default font size of
the browser, e.g., 150%
4. pt – point size, the font-sizing system of
Windows, e.g., 22pt
5. em – the size of the point is multiplied by the value of
the number, e.g., 3em is three times the size of
1em
Typeface of the Characters
• Font-style = possible values for this property are:
italic, normal, and oblique
p.three { p.four {
border- border-
style: dotted; style: dotted;
border- border-
width: 2px; width: thick;
} }
CSS Border Color
The border-color property is used to set the color of
the four borders.
The color can be set by:
•name - specify a color name, like "red"
•HEX - specify a HEX value, like "#ff0000"
•RGB - specify a RGB value, like "rgb(255,0,0)"
•HSL - specify a HSL value, like "hsl(0, 100%,
50%)"
•transparent
p.two {
p.one {
border-
border-
style: solid;
style: solid;
border-
border-color: red;
color: green;
}
}
p.three {
border-
style: dotted;
border-
color: blue;
}
Specific Side Colors
The border-color property can have from
one to four values (for the top border, right
border, bottom border, and the left border).
p.one {
border-style: solid;
border-color: red green blue yellow; /* red top, green right, blue bottom and yellow left */
}
CSS Border - Shorthand Property