Created
April 3, 2017 13:09
-
-
Save isaklafleur/8f0760e97ac4d63ce5da564ef6e87a7a to your computer and use it in GitHub Desktop.
My CSS & HTML Cheat Cheat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h1 id="unique">Unique ID</h1> | |
<h1 class="frequent">To use same style in many places use classes</h1> | |
<h1 class="frequent">To use same style in many places use Classes</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#unique { | |
color: pink; | |
} | |
.frequent { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist shows that using IDs only update the h1 tag one time, when using classes the html elements that has the same class are both updated.