eHow launches Android app: Get the best of eHow on the go.

How To

How to Build a CSS Page for a Website

Contributor
By Jeff O'Kelley
eHow Contributing Writer
(0 Ratings)

Cascading Style Sheets (CSS) are a simple way to add style to web documents. CSS allows you to control elements such as fonts, color, style, and active items from a central document. This allows you to make changes to large websites by altering a single document, rather than making changes to individual pages.

Difficulty: Moderate
Instructions

Things You'll Need:

  • Editing software

    How to Build a CSS Page for a Website

  1. Step 1

    The first step to adding a CSS page to your web document, is to remove all style controllers from your existing document. This includes tags such as <font>, <size>, and <color>. This will allow you to control these elements from the CSS rather than the document itself.

  2. Step 2

    Next, add the following statement into the code of your document, prior to the </head> tag. <link rel="stylesheet" href="mycss.css" type="text/css" /> Replace the "mycss.css" reference with the actual name of your CSS page.Save the document.

  3. Step 3

    Open a blank CSS page in your editing software and then save it with the name you used in Step 2.

  4. Step 4

    Begin adding elements to your CSS page that will control the content. Some suggestions are:body { } - This will allow you to set many definitions such as margins and placementtd { } - This allows you to control how the contents of a table are displayedp { } - The paragraph controller will define the color, size, font and many other options of text within the <p> </p> codinga { }, a:hover { } - Both of these controller define how Internet links are displayedli { } - This allows you to control the appearance of bullet items

  5. Step 5

    There are many books and Internet resources that outline numerous controllers that can be added to your CSS page and how to use them. Research these options and decide which are useful to your website.When you have finished adding items to your CSS page, be sure to save the document. Preview your original web document to view the changes controlled by the CSS page.

Tips & Warnings
  • Research your CSS options before you start. This will speed your programming time.
  • Be sure to add your CSS references to the original document. Items such as <p>, <h1> and <a> will allow the CSS page to control your document.
  • Double check the operation of you page when complete.
  • Don't go overboard with complicated CSS programming. This can often lead to many headaches.
  • Don't mix 'internal' and 'external' CSS if you can help it. This can lead to conflicts and debugging issues.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Tags
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics