Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <head> <style> .button { bordure: aucune; couleur: blanc; padding: 15px 32px; text-align: center; text-decoration: none; affichage: inline-block; taille de police: 16px; marge: 4px 2px; curseur: pointeur; } .button1 {background-color: #D74444;} /* Vert */ .button2 {background-color: #008CBA;} /* Bleu */ .button3 {background-color: #f44336;} /* Rouge */ .button4 {background-color: #e7e7e7; color: black;} /* Gris */ .button5 {background-color: #555555;} /* Noir */ </style> </head> <body> <h2>Couleurs des Boutons</h2> <p>Définissez la couleur de fond d'un bouton avec la propriété background-color, et définissez la couleur du texte avec la propriété color :</p> <button class="button button1">Vert</button> <button class="button button2">Bleu</button> <button class="button button3">Rouge</button> <button class="button button4">Gris</button> <button class="button button5">Noir</button> </body> </html>