La balise link permet de lier cette page html a un fichier CSS
Ce fichier CSS ne contient que du CSS et pas de HTML exemple :
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
/******************* NAV *******************************/
.menu{
color: white;
text-align: center;
background-color: black;
display: flex;
}
.menu li{
width: 100%;
padding-bottom: 20px;
}
.menu a{
color: white;
text-decoration: none ;
text-transform: uppercase; /*Lettres majuscules */
font-weight : bold; /*Lettres grasse */
padding: 5px;
}
li h2:hover{
border-bottom: 2px solid red;
}
.sousmenu ul{
display: none;
}
.sousmenu:hover ul{
display : block;
list-style: none;
}
/************************/
header{
text-align: center;
background-color: lightblue;
padding: 15px;
}
h1 h2{
text-align: center;
}
section{
padding: 20px;
}
div{
display: flex;
margin:20px;
justify-content : center;
}
.important {
color:red;
}
xmp{
color : green;
}
footer{
background-color: lightblue;
color: white;
font-weight : bold; /*Lettres grasse */
text-align: center;
padding: 20px;
}
Si je veux plusieurs pages HTML avec le même style, j'ajoute la balise LINK dans chaque page