Things You'll Need:
- A basic knowledge of HTML coding
-
Step 1
Basic web page displayedCreate a basic web page. A basic web page includes HTML, HEAD, TITLE, BODY tags. These tags need ending tags.
-
Step 2
Basic web page with contentAdd content to your basic web page. In our example we will be using a paragraph tag to add content. The paragraph tag is used to provide a block of text on a web page.
-
Step 3
Empty external style sheetCreate an external style sheet named 'style.css'. The example provided is an empty text file with a comment statement at the top of the page. A text editor can be used to modify this file.
-
Step 4
External style sheet with a sample style declarationCreate a style declaration in your external style sheet that assigns the color green to text using a class named 'mycolor'. A dot is placed in front of the class declaration name to activate the class. A class declaration permits style to be assigned to one or more text element. Assign class names that are meaningful to use but do not use underscores (e.g., my_color).
-
Step 5
External style sheet applied to web pageUsing LINK apply the external style sheet to your web page.
-
Step 6
A green color is applied to text in the web pageApply class mycolor to a word in the paragraph on the web page. The color 'green' will be applied to the word 'example'.








Comments
tylamac said
on 1/9/2009 I'm bookmarking this one. I'm just learning to build web pages and I'm going to need this.