HTML Classes
HTML Classes:
________________________________________________
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>HTML Classes</title> <style> .ex1{ background-color: blue; color: white; border: 5px solid black; margin: 10px; padding: 10px; } .ex2{ background-color: red; color: white; border: 5px solid black; margin: 10px; padding: 10px; } .ex3{ background-color: green; color: white; border: 5px solid black; margin: 10px; padding: 10px; } h1, p{ text-align: center; } </style> </head> <body> <!-- <div> - Division. Used for HTML style class - Used for bind style to div --> <div class="ex1"> <h1>HTML</h1> <p>Website</p> </div> <div class="ex2"> <h1>CSS</h1> <p>Style</p> </div> <div class="ex3"> <h1>JavaScript</h1> <p>Coding</p> </div> </body> </html>
_____________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment