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
Copy Markdown

👍

@Amanchib

Amanchib commented Mar 5, 2021

Copy link
Copy Markdown

Good

@Bayyareddy2

Copy link
Copy Markdown

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

@maquisnoho

Copy link
Copy Markdown

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

Beesettyrakesh commented Oct 21, 2021

Copy link
Copy Markdown

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
Copy Markdown

Nice

@harmaytech3107

Copy link
Copy Markdown

Nice

@DURGESAMSRINATH

Copy link
Copy Markdown

ok

@rio-891

rio-891 commented Mar 29, 2022

Copy link
Copy Markdown

good

@adityatiwari10

Copy link
Copy Markdown

ok

@sskkr999

Copy link
Copy Markdown

ok

@karanganesh11

Copy link
Copy Markdown

ok

@pranjalbansal787

Copy link
Copy Markdown

ok

@NoSoyRo

NoSoyRo commented Nov 14, 2022

Copy link
Copy Markdown

good

@damingogogo

Copy link
Copy Markdown

good

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