CSS Tutorial

Welcome to my CSS Tutorial. CSS (Cascading Stylesheet) is just a way of making all of the colors on your website the same without having to re-type the colors every time on every page. You make one central document and link all of the other ones to that. If you want to change the colors you just change that one central file. CSS can be done right in the HTML Document of it can be done in a text document with the .CSS extension. I will show you the .CSS file method.

Open up notepad or another ASCII text editor. Copy the text below.



a:link
{
color: rgb(0,0,0);
}

a:visited
{
color: rgb(0,0,0);
}

a:active
{
color: rgb(0,0,0);
}

body
{
font-family: Verdana, Arial, Helvetica;
background-color: rgb(0,0,0);
color: rgb(0,0,0);
scrollbar-base-color: rgb(255,255,255);
}

table
{
table-border-color-light: rgb(0,0,0);
table-border-color-dark: rgb(0,0,0);
}

h1, h2, h3, h4, h5, h6
{
font-family: Verdana, Arial, Helvetica;
}

h1
{
color: rgb(0,0,0);
}

h2
{
color: rgb(0,0,0);
}

h3
{
color: rgb(0,0,0);
}

h4
{
color: rgb(0,0,0);
}

h5
{
color: rgb(0,0,0);
}

h6
{
color: rgb(0,0,0);
}




On the stylesheet above you see above there are a:active, body, H2, and so on. Then there is Font Family and Color. The different HTML Tags and Attributes can be placed in a stylesheet so that tag's color of font is different. For example if I want to change the color of the P tag to cyan I would place this in the stylesheet.


p
{
color: rgb(0,128,128);
}

This is what CSS does. Take a look at the stylesheet from this page. You can download it in the CSS Library. Take a look at it. Mess around with it. Try it on your own page. To include a stylesheet on your page then type the following in the headers. Change only the location and name of stylesheet. Nothing else.


<LINK HREF="location and name of stylesheet.css" REL="stylesheet">

Links/More_Resources

Website Tips
World Wide Web Consortium (W3C)

Created on ... April 17, 2002