Skip to content

Instantly share code, notes, and snippets.

@isaklafleur
Created April 3, 2017 13:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
My CSS & HTML Cheat Cheat
<!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>
#unique {
color: pink;
}
.frequent {
color: red;
}
@isaklafleur
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment