logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Jokes & Riddles
Astronomy
Philosophy
Public Health
Canadian Culture


dailyclick
All times in EST

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

External Style Sheets and Embedded CSS Style Sheets
Guest Author - Diane Cipollo

There are a few things that make external style sheets different from embedded style sheets.

Embedded Style Sheets
In the previous tutorials you saw examples of embedded CSS style sheets and you learned that the basic CSS code for an embedded style sheet begins and ends with the <style> tags. Inside these tags are the CSS code which is made up of each selector(s) and its respective property-value pairs. Finally the embedded style is placed in the head section of your webpage.

Example
<style type="text/css">
<!--
p {font-size: 12pt; color: #000000; text-align: center}
-->
</style>

External Style Sheets
External style sheets are a little different because they do not have the beginning and ending <style> tags. In fact, you cannot have any HTML tags except for comments and the @import statement. It is basically a text file that contains only the CSS code.

Example
body {background-color: #ffffff}

p {font-size: 12pt; color: #000000; text-align: center}

You can name your external style sheet anything you like but it is a good practice to give the file a name that reflects the purpose of the CSS code. For example the CSS code that controls the style for the menu links on your webpage might be called menu.css. Although it is optional, you should use the .css extension for your external style sheets.

After you create you external style sheets, you can use them on any webpage by placing either the <link> tag or the @import statement in the head section.





RSS | Previous Features | Site Map


Content copyright © 2008 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

Digg! g delicious Save to Del.icio.us

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
How To Set Up a Mailto Link

Using CSS to Set a Background Image

Choosing the Right Font, Part Two

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2008 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor