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> .city { couleur-de-fond: tomate; couleur: blanc; padding: 10px; } .main { text-align: center; } </style> </head> <body> <h2>Classes multiples</h2> <p>Ici, les trois éléments h2 appartiennent à la classe "city". De plus, Londres appartient également à la classe "main", qui centre le texte.</p> <h2 class="city main">Londres</h2> <h2 class="city">Paris</h2> <h2 class="city">Tokyo</h2> </body> </html>