René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
CSS (Cascading Style Sheets) | ||
Including CSS in a html page
There are three ways to include CSS in a html page:
Inline
Inline styles allow to insert a specific style directly with the html-tag they're applied to:
<p style='font-family:Verdana'>some text</p> Style Tag
Style tags are usually placed in the head part of the html document:
<html> <head> <title>Some Title</title> <style type='text/css'> <!-- p { color:blue; font-family:'Verdana'; } h1 { color:red; font-family:'Verdana'; font-size:12px; } --> </style> </head> <body> <h1>Heading 1</h1> <p>Inside P</p> </body> </html> External Styles<link rel='stylesheet' type='text/css' href='somestylesheets.css' />
Note, external style sheets are included by the link tag, not a style tag. Also, the included style sheet must not contain any html or style tags.
Other CSS thingsLinks
www.w3schools.com/css/default.asp
Selectutorial - CSS selectors Floatutorial Listtutorial CSS 2 reference with examples CSS Zen Garden www.alistapart.com www.thenoodleincident.com Flexible Layout mezzoblue Cascading Style Sheets, level 2 CSS2 Specification. And here's its property index. Here's a CSS Checker. |