Introducing CSS
This is pretty cool, oh yes. Although we can put tags in the html page to change the style and colour of headings this is not the best way to do it. This is because, if we change our mind about our chosen colour we have to go and edit every heading. With CSS we can change the colour of all H1 headings in a document at the same time. The HTML file contains the content and the CSS contains the style information. In order for this to work properly you must link the stylesheet to the html document as shown in the <head> of the example HTML file.
Simple CSS (part 1) Resource
More CSS re-defining more tags. Resource
CSS tags for the more adventurous - defining where content appears on the page, without using a table.
Using divs to define page layout Resource
An example css file (not so simple) text file
Example html file using CSS text file
The following links take you to resources for learning CSS:
http://www.htmldog.com - cssbeginner file
Interactive CSS tutorials file
Another CSS reference site file
Example of changing line height with css: Example css class:
.brandnewstyle { line-height: 150%; }
Used in html page:
<div class="brandnewstyle">Let's have some text<br> This is a paragraph with a bigger line-height. This is a paragraph with a bigger line-height. This is a paragraph with a bigger line-height. This is a paragraph with a bigger line-height. </div>
Note brandnewstyle can be used with a paragraph as well: <p class = "brandnewstyle">
|