internet.com
You are in the: Small Business Computing Channelarrow
Small Business Technology
» ECommerce-Guide | Small Business Computing | Webopedia | WinPlanet |Refer-It

WinPlanet Software Downloads and Reviews for Small Businesses
Search
Power Search | Tips
-
Navigate WinPlanet
WinPlanet Home Page

Software
Download Index
In-Depth Reviews
Tips & Tutorials
Updates
News

Software Categories
Browsers
Chat / Conferencing
Desktop Utilities
Development
Internet Apps
Multimedia
OS Service Packs
Productivity Tools

Software Glossary

WinPlanet Newsletter

internet.commerce
Partners & Affiliates













Small Business Computing
Small Business Computing
Ecommerce Guide
Webopedia
WinPlanet

WinPlanet / Tips & Tutorials

Download of the day
Internet Explorer 8

Most Popular Software Downloads
Opera
Internet Explorer 7
QuickTime for Windows
Winamp
Mozilla Firefox 3
Ad-Aware 2008 Free
Adobe Flash Player
Paint Shop Pro
Adobe Shockwave Player
AVG Anti-Virus Free
7-Zip

Most Popular Software Articles
Windows Vista Tips & Tricks, Part 1
Windows Vista: Worthy of the Hype?
Windows Wireless Zero Configuration: Five Steps to Sanity


Software Reviews

CSS: Cascading Style Sheets Made Easy
Using Cascading Style Sheets (CSS)
Taylor Anderson

HTML was originally intended to be used to define the content of a document using tags such as <h1>, <p>, <table>, with the browser responsible for taking care of the layout without the use of formatting tags like <font>. As the major browsers (Internet Explorer and Netscape) continued to add support for more and more tags, though, it became very difficult to create Web sites where the content was separated from the presentation layout.

In other words, the design and content became intertwined, making it difficult to make changes. The W3 (World Wide Web Consortium) created styles in response. Most modern browsers now support Cascading Style Sheets (CSS), which can save you a lot of work when designing a Web site. And instead of having the same styles in the <head> tags of each page on the site, you can have an external style sheet to control the layout and styles of the entire site. This means that you can now change many elements of an entire Web site simply by changing one file!

Using CSS: Where?

There are two ways to define styles using CSS. The best way is generally to use an external CSS file so that you can control many different elements throughout the entire site instead of defining the same elements over and over in all of the HTML files.

To make use of CSS, simply insert the following code between the opening <head> tag and the closing </head> tag.

         <link rel="stylesheet" type="text/css" href="path/to/stylesheet" />

Simply insert that between the <head></head> tags in a HTML document.

NOTE: For “path/to/stylesheet” insert the path from the HTML file you are editing to the CSS page.

The second way is to insert <style></style> tags in the head tags. This is a good way to define specific styles you only use on one page; otherwise you will want to use an external file sheet for two big reasons: visitors only have to load the sheet once, and you can control the styles for the entire site by editing one page.

Formatting Text

Using CSS for formatting text is much easier than using <font> tags everywhere! Let’s start formatting some text.

Open Notepad or favorite HTML editor, where you can copy and paste the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<h1>CSS: Cascading Style Sheets</h1>
<p>I love CSS, its so easy to use and it makes changes much easier! I can do things in CSS that HTML can’t!</p>
</body>
</html>

Personally, I use XHTML for every type of Web site now because it’s cleaner and more precise than HTML 4.01. After you’ve inserted the above code, save the file as index.html

| Next Page »

Contents:
1. Using Cascading Style Sheets (CSS)
2. Defining Styles






JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers