1. Home
  2. Computing & Technology
  3. Web Design / HTML

How to Add Style Sheets

By , About.com Guide

< Previous - CSS Syntax | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Modify Fonts with CSS >

Inline Styles:

Inline styles are added directly to the element to be styled with the style attribute:

<p style="color: red;">
Internal Style Sheets:

Internal style sheets are added to the <head> of a document inside <style> tags:

<style type="text/css">
<!--
p { color: red; }
-->
</style>
External Style Sheets:

External style sheets are the most flexible because they allow you to assign the same styles to multiple Web pages. You can attach external style sheets in two ways:

<link rel="stylesheet" type="text/css" href="styles.css" />
@import url(addonstyles.css);

< Previous - CSS Syntax | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Modify Fonts with CSS >

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Beginning CSS
  6. CSS Tutorial
  7. How to Add Style Sheets - Internal Style Sheets, External Style Sheets , Inline Style Sheets, Add CSS>

©2009 About.com, a part of The New York Times Company.

All rights reserved.