Learning HTML by yourself
6 - Starting CSS coding for one page.
If you want to set up a stylesheet to affect one Web page, you can do that with a stylesheet in the head of your document. For this you use the tag in the
of your Web document.
Rules for Style Sheets
- Style tags should be held in the
All style information should be stored within the
This is how the browsers know that the information is for styles.
Always include a type attribute in your style tag.
This attribute indicates what types of style rules you will be using. The most common type of style rule is CSS, but there are other types (XSL, JSS, and others).
Tips for Working with Style Sheets
Here are some tips for working with these stylesheets:
Start them out right
Use attributes of the style tag to define what the browser should expect
- Use comments. Comment tags insure that older browsers don't display your stylesheets.
- Think about your styles. In many cases, you don't need to set a lot of different stles, just simple ones that cover how your text and other elements should be dkisplayed on your page. If you don't plan to have any red, blinking, 36 point headlines on your page, then defining a style for that is a waste of bandwidth.