function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i
Style sheets are a newer method of styling (changing the appearance)
your web page or site. There are 3 ways of specifying the style information. Basically the difference of the 3 ways is where you place your definition,
the style rules. In this lesson you are going to learn about the External
style sheet. Don't be worried about the word rules, they are very simple instructions
to say your page will look like. These rules are written into a text file
that is given an extension of .CSS rather than .TXT You will shortly write a style sheet that you will save as... my.css
Like your HTML pages they can be written by Windows Notepad, but special
CSS editors are available, and many of the Web Authoring programs contain
a CSS editor. The very big advantage of this system is that the rules are placed into
a separate file, and these rules will apply to every page that you refer
to this file. The reference is made in the HEAD section, normally just before
the end </HEAD> tag and follows the following format: <LINK rel="STYLESHEET" href="path/name-of-file"> Because you are going to save your file my.css into
the same directory that contains your web pages you do
not have to worry about the path portion. If the file is in a different directory, then you would have
to use either Exercise 1. Refer to an External Style Sheet Using Notepad or your HTML Editor open up your file page1.htm Step 2. Enter the following code on the line before Its as simple as that. For every file that you wish to use
my.css style sheet you repeat the above, if you have several
files it is easy to copy and paste this line into all your pages. Repeat the above with your files Index.html, tut3-exercise.htm
and page3.htm Style Rules are made up from a Selector and Declaration(s)
as follows This may seem confusing but the example in the next step should
help to make it clear. Using Notepad or a Style sheet editor, enter the following.
You can copy and paste this code if you prefer. Pay particular attention to the puntuation i.e. :
; , - { } make sure they are used in the correct
place. A mistake in the puntuation is hard to spot. Often More Tutorials
Leeds
my home town Relax in the sun. Copyright © John McGuinn 2001-03 .
![]()
How to use a Cascading
Style Sheets (CSS)
![]()

Tutorials
16 Forms
Information
Index
Adobe
Free
Recomended
Student Licence
Tools
Templates

Cascading Style Sheets (CSS)
![]()


Page Contents - Cascading Style Sheets (CSS)
Lesson Introduction - Cascading
Style Sheets (CSS)
External style sheet
Up to 80% off for Students from Adobe. Plus FREE Shipping Offer
Search this site for a word or phrase. Place phrases inside "double
quotes"
How to Refer (Link) to an External Style Sheet
Step 1. Open your page1.htm file
<LINK rel="STYLESHEET" href="my.css" type="text/css">
</HEAD>
Step 2. Save
Step 3. Repeat with your other pages.
Writing the Rules
Selector {Property 1: value ;Property 2: value ;and so on;}
To make it easier to read, you can write the rules as follows: Selector {
Property 1: value ;
Property 2: value ;
and so on;
}
Step 1. Enter the Rules
H1 {
font-family: Arial, helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
color: red;
text-align: center;
background-color: blue;
}
BODY {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
background-color: yellow;
}
P { font-family: Georgia, "Times New Roman", Times, serif;
font-size: 10px;
color: green;
background-color: white;
}
Step 2. Save as... my.css
![]()
![]()
![]()
![]()
![]()
![]()

![]()
![]()

Leisure Time - book your holiday or flights with our UK sponsors

Book a Monarch Holiday
Book a Thomson holiday
Book a Portland Holidays Direct
Fly Thomas Cook flights
Direct Holidays
Jet2 Cheap flights
Home page of a tutorial in programming in Smalltalk, a object-oriented programming language.
This is an ideal tutorial for anybody learning Smalltalk and of particular interest
to students on courses: M206 at the OU Open University, and course CSC517 at NCSU North
Carolina State University
Home page of a tutorial in programming in C This is an ideal tutorial for anybody
learning C programming language, and of particular interest to students on courses:
T223 at the OU Open University.