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
1. Inline style sheet defined within a
tag. 2. Internal style sheet defined within the
head part of a page called an 3. External style sheet defined in a separate,
hence external, file. This page introduced 31 Jul 03 is being worked on. More information will
be added Style Sheets, Cascading Style Sheets and CSS are all mean the same thing
and are the modern way of defining the design and layout of your web page(s).
An ideal way of replacing the deprecated tags and attributes, such
as the FONT tag. In this tutorial you will learn how to change the look of your pages, background,
text and link colours, the look of tables, headings borders and many other
aspects of a pages appearance, using CSS. With CSS you can either A style is defined with three sections: a selector, a property and
a value as follows selector {property: value} Example of defining a HTML tag: P {font-size: 10pt} Where several properties and values are required for a particular selector,
the above can be repeated P {font-size: 10pt} or the following shortcut can be used selector {property: value; property: value; property: value; } Example: BODY { There are 3 types of style sheets. The difference is where the style is
defined and the area where that style is applied. Note that more than one of these 3 types can be
used on a page, and you can link more than one External style sheet to a
page. Inline style sheet are should only be used where
a particular style is not going to be repeated elsewhere on the page/site. The definition is defined within the HTML tag in the body
section of the HTML code. It must be redefined every time it is required The sytax for inline styles is slightly simpler than that of Internal
and External styles in that there is no selector and no curly brackets. Using style example The definition is written once in In the head part of a page.
It must be written on every page that requires that style. Because of the above it is ideal if only 1 page is going to be used
for this style. The styles can then be used more than once throughout the page. The Internal style sheet is defined within the head section. <head> Example: <head> This is the best method if you wish to control the design of more that one
page. The style definitions are only written once and saved into a file. Each
page that wishes to use that file places a link to the file in the HEAD section. <HEAD> Section of your pages Place the following link into the <head> section of your page, use
the name you have selected for the CSS file in place of yourStyleFileName.css <link rel="STYLESHEET" href="yourStyleFileName.css" type="text/css"> CSS files are ordinary text files and can be written in a simple text editor
such as notepad. The file must be given the extension .css The term Cascading is used because more than 1 style sheet can be used on
any particular page. If the same style is defined with different values in
the different style sheets then the order of precedence is Inline Style Sheets Internal Style Sheets The last External Style sheet moving in order to the first
External Style Sheet linked in the head section, The Body tag has properties and values that control the
appearance of the page. The following code example code has the more popular properties
and values BODY { As stated earlier the font that is selected by you can not be used unless
that font is on the users computer. Therefore only popular fonts should be
used. As a safeguard more that 1 font can be defined. This allows alternative
fonts to be stated, in case your first choice is unavailable on the users
computer. It is better to list more than 1 font to ensure that the user views your
page as intended. The selection should end with a generic font e.g. serif,
sans-serif, cursive, fantasy, or monospace. Fonts with spaces in there names such as "Times New Roman" must
be placed in quotes. The size of the font can be in Examples: font-size: 10px; font-size: 8pt; Any valid colour or transparent. Initial value transparent. Examples: background-color:#3333FF; background-color:red Defines the Text colour Examples: Because CSS is only text
then any text editor can be used such as Notepad. Specialised editors can actually
write the code for you. has a built is CSS editor that writes all the code for you. Students can obtain Dreamweaver in the Macromedia Student Studio
MX More Tutorials
Leeds
my home town Relax in the sun. Copyright © John McGuinn 2001-03 .
![]()
Cascading Style
Sheets (CSS) Tutorial. Inline, embedded and external styles.
![]()

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

Tutorial-12-CSS
![]()


Page Contents.
Introduction
Defining a Style
Applying Style Sheets
< HEAD> Section of your pages
CSS external file
P tag
BODY tag
CSS Editors
Introduction
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"
and / or
Defining a Style
P {color: #000033}
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
background-color: #3333FF;
color: #000033;
}
Applying Style Sheets
1. Inline style sheet Within a tag
Use for
Where to define
Syntax
<element STYLE="property:value"> 2. Internal style sheet
Where to define
Use for
< style type="text/css">
Your Style definitions go here
< /style>
< /head>
< style type="text/css">
Body {background-color: #3333FF; color: #000033;}
p {margin-left: 6px}
< /style>
< /head>3. Create a separate style sheet file
Use for
Where to define
CSS external file
Cascading
Order of precedence
BODY tag
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
background-color: #3333FF;
color: #000033;
}font-family:
Examples:
font-family: Verdana, Arial, Helvetica, sans-serif;
font-family: Georgia, "Times New Roman",
Times, serif;
![]()
font-size
Size in
Use
Size in
Use
Pixels
px
Picas
pc
Points
pt
ems
em
Inch
in
exs
ex
Centimetre
cm
%
%
Millimetre
mm
background-color:
color:
color: #000033;CSS Editors
Specialised CSS editors
Dreamweaver
More Details Windows Mac
![]()
![]()
![]()
![]()
![]()

![]()
![]()
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.