| * |
een embedded style sheet <STYLE TYPE="text/css"> <!-- hier komen de css-codes // --> </STYLE> |
| * |
een cascading style sheet (CSS) <LINK HREF="stylesheet.css" TYPE="text/css" REL="stylesheet"> |
| * |
een imported style sheet Als uitbreiding op een CSS kan je een andere stylesheet importeren: <LINK HREF="stylesheet.css" TYPE="text/css" REL="stylesheet"> <STYLE TYPE="text/css"> <!-- @import "stylesheet1.css"; // --> </STYLE> |
| * | font-family: serif, sans-serif, cursive, monospace of fantasy |
| * | font-weight: bold |
| * | font-size: in pixels (bijvoorbeeld 10px) of punten (bijvoorbeeld 10pt) |
| * | font-style: italic |
| * | text-align: right, left of center |
| * | text-decoration: none (links niet onderstrepen) |
| * | color: #rrggbb of kleurnaam (bijvoorbeeld red) |
| * | margin-left, margin-right, margin-top, margin-bottom: in pixels (bijvoorbeeld 10px) of relatief aan paginagrootte (bijvoorbeeld 20%) |
| * | border-width: in pixels (bijvoorbeeld 10px) |
| * | border-color: #rrggbb of kleurnaam (bijvoorbeeld white) |
| * |
<STYLE TYPE="text/css"> <!-- BODY {left-margin: 10px; right-margin: 10px} H1 {font-family: fantasy; font-size: 10px} H2 {font-size: 8pt; text-align: center; font-weight: bold; color: blue} A {text-decoration:none} // --> </STYLE> Het is ook mogelijk om bijvoorbeeld een opmaak te definieren voor een <B>-tag, maar alleen als die binnen een <H1>-tag voorkomt: H1 B {font-size: 18pt} |
| * |
<HEAD> <STYLE TYPE="text/css"> <!-- all.GROEN {color:#44CC22; font-weight:bold;} // --> </STYLE> </HEAD> <BODY> <H1 CLASS=GROEN>Deze kop is groen,</H1> <H1>en deze niet.</H1> </BODY> all geeft aan dat de class bij alle tags gebruikt mag worden. Als een class bijvoorbeeld alleen bij <P> gebruikt mag worden, kan je een class definieren met bijvoorbeeld P.GROEN {color:#44CC22}. |
| * | Deze tekst is niet <SPAN STYLE="color:red">rood</SPAN>. |
| * | De Webmees van Hans Werksman bevat veel informatie en links over onder andere style sheets |
| * | Netscape: http://developer.netscape.com/docs/manuals/communicator/dynhtml/index.htm |
| * | Microsoft: http://msdn.microsoft.com/workshop/author/default.asp |