css

Page 6

Een stijldefinitie kan ook in een apart bestand staan. Zo kunnen alle pagina’s van de website gebruik maken van dezelfde stijldefinitie. Eén keer de stijl opmaken en je bent klaar voor alle pagina’s. De style-sheet: stijl.css body {font-family : Helvetica ; background-color : pink} h1 {color : blue ; font-weight : normal ; margin-left : 20px} h2 {background-color : yellow; padding : 10px; border-width : 5px; border-style : solid; border-color : green; margin : 10px 20px 30px 50px; font-family : arial; color : red; } h3 {font-family : trebuchet; font-size : 10px; color : darkblue;} i {text-decoration : underline} p {margin-left : 20px; font-family : sans-serif; color :white; font-size : 20px; } De pagina: index.html <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”nl” lang=”nl”> <head> <title>Mijn homepage</title> <link rel="stylesheet" type="text/css" href="stijl.css"> </head> <body> <h1>Rudi's homepage</h1> <h2>Bands</h2> <p>Deze bands vind ik ongelooflijk <i>cool</i>:</p> <ul> <li>Blof <li>Acda en de Munnik <li>Krezip <li>Surrender </ul> <h3>Welke band vind jij leuk?</h3> </body> </html>

6


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.