Skip to content

Instantly share code, notes, and snippets.

@AndrewEddy
Created May 19, 2015 16:55
Show Gist options
  • Select an option

  • Save AndrewEddy/056ece6f86ea6e16075f to your computer and use it in GitHub Desktop.

Select an option

Save AndrewEddy/056ece6f86ea6e16075f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>ID and Class Page</title>
<style>
#main-navigation {
color: brown;
}
h1 {
color: aqua;
}
.headerone {
color: blueviolet;
text-decoration: overline;
}
.headergreen {
color: green;
text-decoration: underline;
}
</style>
</head>
<body>
<div id="main-navigation"><ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul></div>
<h1 class="headerone">Header One</h1>
<h1 class="headerone">Header One</h1>
<h1 class="headerone">Header One</h1>
<h1 class="headerone">Header One</h1>
<h1 class="headergreen">Header Green</h1>
<h1 class="headergreen">Header Green</h1>
<h1 class="headergreen">Header Green</h1>
</body>
</html>
@1998rahulpatel
Copy link

👍

@Amanchib
Copy link

Amanchib commented Mar 5, 2021

Good

@Bayyareddy2
Copy link

I think there is no need for h1 { color : aqua; }.

@maquisnoho
Copy link

In the Style element above, Main-navigation is with a hashtag, but not h1. Headerone and headergreen is with a "." So my understanding is that if it's a unique word, it has to be with a hashtag. If it's a tag, it is by itself. If it's a class, it is with "." Am I correct?

@Beesettyrakesh
Copy link

Beesettyrakesh commented Oct 21, 2021

In the Style element above, Main-navigation is with a hashtag, but not h1. Headerone and headergreen is with a "." So my understanding is that if it's a unique word, it has to be with a hashtag. If it's a tag, it is by itself. If it's a class, it is with "." Am I correct?

yes.

@Yashashwee
Copy link

Nice

@harmaytech3107
Copy link

Nice

@DURGESAMSRINATH
Copy link

ok

@rio-891
Copy link

rio-891 commented Mar 29, 2022

good

@adityatiwari10
Copy link

ok

@sskkr999
Copy link

ok

@karanganesh11
Copy link

ok

@pranjalbansal787
Copy link

ok

@NoSoyRo
Copy link

NoSoyRo commented Nov 14, 2022

good

@damingogogo
Copy link

good

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