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

How To

How to Use CSS Templates

Contributor
By Lady_Glass
eHow Contributing Writer
(0 Ratings)

Cascading Style Sheets (CSS) templates are a huge time-saver when creating standards-compliant Web pages. CSS allows you to assign rules to control specific portions of your pages, such as text or margins, and bypass a lot of the HTML coding that can slow down page loads. You can use ready-made CSS templates by just linking the CSS file to your HTML documents and save yourself from having to do all the initial setup work.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • CSS template
  • HTML text editor, such as BBEdit or Dreamweaver
  • Web server
  • File Transfer Protocol (FTP) application (optional)
  1. Step 1

    Obtain a CSS template from an HTML text editor, such as Dreamweaver, or locate a third-party template on the Web that licenses the work for distribution (see Resources).

  2. Step 2

    Create an HTML file or open an existing one in your text editor.

  3. Step 3

    Name and save your CSS file with the ".css" extension and upload it to your Web server. Place the document in the same folder as your other Web files. Use an FTP application, such as Fetch, to upload the file, or follow your Web host's instruction for this process.

  4. Step 4

    Locate the "<head></head>" tags in your HTML document and place a link to the CSS file in between these two elements. This task assigns the formatting rules to your document. For example:
    <head><link href="your.css" rel="stylesheet" type="text/css"></head>

  5. Step 5

    Open your CSS file and make style rule adjustments, such as font style or background color, if preferred. Locate the specific rule and change the value found after the colon. For example, if the font color is currently set to gray and you want it to be black, change "{ color: gray }" to "{ color: black }".

  6. Step 6

    Save both the CSS and HTML files and launch a Web browser, such as Safari or Internet Explorer, to preview the page. Use your browser's "Open File" function to select the file and launch the page.

Tips & Warnings
  • If you do not see the CSS style rules taking effect in your Web page, make sure that both the CSS and HTML files are saved and that you have correctly linked the CSS file.
  • Never use a CSS template without first understanding the license requirements. Some code creators require that you credit and reference them in your own CSS file, and others create templates for educational purposes only.
Subscribe

Post a Comment

Post a Comment

eHow Article: How to Use CSS Templates

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Tags
Get Free Internet 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.

Demand Media
eHow_eHow Technology and Electronics