Introduction to Styles

Vine

This lesson:  Overview | Advantages | Disadvantages | Types of Styles | Inline Style Example | Embedded Style Example | Linked Style Example | Using Styles | References |
Other lessons:  Style Syntax | Order of Precedence | Style Properties | Other Style Information
Intro. to Styles | Inline Styles | Embedded Style Sheets | Linked Style Sheets

Note:  The information presented for styles is intended as a very broad overview.

Overview

Styles, also referred to as style sheets, are used to control the formatting of text or other web page elements (such as the background).  Styles may be applied to:

The term, Cascading Style Sheets (CSS), means that:

Advantages of Styles

Disadvantages of Styles

Types of Styles

There are three ways of adding style information to web pages.  You may use:

Examples of Inline Styles

The style information for an inline style is inserted within the HTML tag.

<H4 style="font-size: 16pt; color: navy">

Examples of Embedded (Internal) Style Sheets  

The style information for an embedded style sheet is contained within the STYLE tags of a web page.

Examples of Linked (External) Style Sheets

The style information for a linked style sheet is placed in a separate file.  A link is established between the web page and the file containing the style information.  

<LINK rel="stylesheet" type="text/css" src="mystyles.css">

This is the style information that is contained in the file, mystyles.css:
H4 { font-size: 16pt; color: navy }

Using Styles

A web page editor, a style editor, or a text editor may be used to create the style information.  Some things to keep in mind:

References

Penn State Behrend Home | Computer Center Home

This page is maintained by Carolyn Dudas
Updated May 21, 2002