La page HTML contient l'information et sa structure (titre, sous-titre, paragraphe...), la page CSS, elle, que le style (police, couleur, ... la présentation généralement)
<style type="text/css"> <!-- h2 { font-family: Comic Sans MS; font-size: 24pt; color: green;} --> </style>
<p style="font-family: Comic Sans MS; font-size: 24pt; color: green;">Un titre 2</p>
<h2>Un <span style="font-family: Comic Sans MS; font-size: 24pt; color: green;">titre</span> 2</h2>
exemple :
salaries_par_poste.htm
<html> <head> <link rel="stylesheet" type="text/css" href="geshum.css"> </head> <body> <h1>AJUSTEUR</h1><hr> <ol> <li><h4>MANSOUR</h4><br><h5>GILLES</h5></li> <li><h4>ALBERT</h4><br><h5>GERARD</h5></li> <li><h4>MEYER</h4><br><h5>JEAN</h5></li> <li><h4>COLIGNON</h4><br><h5>MARCEL</h5></li> </ol> <h1>CHEF D'EQUIPE</h1><hr> <ol> <li><h4>GERMAIN</h4><br><h5>PAUL</h5></li> </ol> </body> </html>
geshum.css
h1 {color: green;} h4 {display: inline;} h5 {display: inline; color: navy; font-style: italic;} hr {color: red;}
C'est la solution la plus centralisée : toutes les pages HTML auront la même feuille de style en cascade
SOLUTION à privilégier
Comment faire pour personnaliser une même balise ?
Une nouvelle balise pour ne pas reprendre des balises spécifiques : <div>
Dreamweaver 2.0, Front Page 2000 (éditeur HTML)
TopStyle Lite 3 (éditeur CSS ) - version personnelle gratuite
Visual Studio .NET 2003 (multi-éditeurs, notamment éditeur CSS)