Writing for the World Wide Web | |
Home Course Information Assignments Schedule Class Notes Resources Student Pages |
Class Notes
Planning Site Navigation Organizing WWW Files Using Webpage Editors Upload / Download (FTP) Visual Design Appropriate Use of Technology Unix Commands Cascading Style Sheets JavaScript |
Changing HTML Tags
Sometimes we want HTML tags to do a little more than just the single function they are intended for. Using Cascading Style Sheets, we can create special types, or classes, of existing HTML tags that will include other features. Cascading Style Sheets are useful when you want to have consistent sets or types of information in one or many HTML documents. For example, sometimes we may want a bolded font to also be italicized and show up in red; we could create a special class that could create this type of text.
You would need to put style and /style tags in the head of your document, then create classes for each of the links:
When you wanted to use these classes, you would add a class attribute to the given tag, like this:
Notice: b.bigred and td.specialcell are special instances of the b and td tags that you need to include the class attribute in. However, the h3 tag will always make that text green because no class was created; every h3 element in your document would be affected by the style sheet. So the above code would look like this:
|