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

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

new
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA
Irish Culture
Home Finance


dailyclick
All times in EST

Full Schedule
g
g HTML Site

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.




This site needs an editor - click to learn more!

Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Twitter Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Facebook Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to MySpace Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Del.icio.us Digg External+Style+Sheets+and+Embedded+CSS+Style+Sheets Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Yahoo My Web Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Google Bookmarks Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Stumbleupon Add External+Style+Sheets+and+Embedded+CSS+Style+Sheets to Reddit




RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


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


Content copyright © 2014 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 BellaOnline Administration for details.

g


g features
What's Coming in HTML 5

What is FTP?

HTML Fundamentals - Tables

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


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


BellaOnline Editor