In this tutorial, additional styles will be illustrated.
There are three ways of specifying styles on web contents:
The examples can be found at www.w3schools.com
You can define the behavior of hyperlinks such as hover on a hyperlink. For example, if you move mouse over this hyperlink The Computer Science Program at Texas Wesleyan, the color and font size of the link change.
a:hover
{
color:green;
font-size:14px;
}
Make a box with specification of margin, border, and padding
div
{
background-color:Yellow;
margin-top:20px;
margin-left:50px;
border:solid black 1px;
border-top:dashed 3px red;
border-bottom:solid 3px green;
padding-top:5px;
padding-bottom:10px;
width:75%;
}
Change the style of lists
ul
{
list-style-type:square;
}
ol
{
list-style-type:upper-roman;
}
The Longest Journey Begins with the First Step
--Chinese Proverb.
If I don't know I don't know
    I think I know
If I don't know I know
    I think I don't know
Laing R D (1970) Knots Harmondsworth; Penguin (p.55)
Make decoration of text
address
{
text-decoration:line-through;
}
Change transparency of images
<img src="http://www.txwes.edu/provost/images/provosthome.JPG" onmouseover="this.filters.alpha.opacity=100" onmouseout="this.filters.alpha.opacity=40" />
The complete list of styles used in this page is below:
body
{
background-color:#b0c4de;
background-image:url('Seal-Color.gif');
background-repeat:no-repeat;
background-position:right bottom;
}
h1, h2, h3, h4, h5, h6
{
text-align:center;
}
pre
{
background-color:#ccccff;
}
table
{
border-collapse:collapse;
width:75%;
}
table, th, td
{
border: 1px solid green;
padding:6px;
background-color:blue;
color:white;
}
td
{
text-align:left;
vertical-align:center;
height:50px;
}
th
{
background-color:green;
color:white;
}
caption
{
color:Yellow;
font-size:16px;
font-weight:bold;
}
blockquote
{
border:solid 1px red;
width:500px;
}
#firstquote
{
background-color:white;
}
#secondquote
{
background-color:aqua;
}
ol
{
list-style-type:upper-roman;
}
ul
{
list-style-type:square;
font-weight:bold;
color:red;
}
address
{
text-decoration:line-through;
}
div
{
background-color:Yellow;
margin-top:20px;
margin-left:50px;
border:solid black 1px;
border-top:dashed 3px red;
border-bottom:solid 3px green;
padding-top:5px;
padding-bottom:10px;
width:75%;
}
a:hover
{
color:Aqua;
font-size:small;
font-weight:bold;
font-family:Palatino Linotype;
}
img
{
filter:alpha(opacity=20);
}