Skip to content

Commit b89050d

Browse files
committed
correct "classes" to "ids" for CSS hash-selectors
1 parent 3176806 commit b89050d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ <h2>Some Basic Interaction</h2>
13371337
<article class='slide slide-list'>
13381338
<h2>CSS id's</h2>
13391339
<p>It's best practice to not have too many inline &lt;style&gt; attributes in a webpage. Remember that CSS is meant to help keep the presentation layer seperate from the content layer.</p>
1340-
<p>When you need to target certain containers, use the <code>id</code> attribute and put the CSS into the <code>&lt;style&gt;</code> tag. Use a <strong>hash</strong> to denote CSS selectors that are classes. e.g. <code>#centered_on_page</code></p>
1340+
<p>When you need to target certain containers, use the <code>id</code> attribute and put the CSS into the <code>&lt;style&gt;</code> tag. Use a <strong>hash</strong> to denote CSS selectors that are ids. e.g. <code>#centered_on_page</code></p>
13411341
<p>You should only have one instance of an ID per page. Any more can cause errors in your page and CSS -- and even later, JavaScript.</p>
13421342
<pre>
13431343
&lt;div <strong>id="centered_on_page"</strong>&gt;Center me&lt;/div&gt;

0 commit comments

Comments
 (0)