-
Notifications
You must be signed in to change notification settings - Fork 0
/
0.02_cssids.html
32 lines (30 loc) · 962 Bytes
/
0.02_cssids.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<title>Ids</title>
<link rel="stylesheet" type="text/css" href="./0.02_cssids.css">
</head>
<body>
<h1>Ids</h1>
<p>An Id is a unique identifier</p>
<div>
<h3>Id notes</h3>
<ul class="customClass">
<li id="customID">Is unique to th element that it's on</li>
<li>to target it from our css we need to use a # sign</li>
<li>you can use them with classes on the same element</li>
<li>Use one off styling</li>
</ul>
</div>
<h2>Ids versus Classes</h2>
<div>
<h1>Ids</h1>
<p id="idOne">This id will be linked in the css page by #a</p>
<p id="idOne idTwo">You can't have two ids on an element</p>
<h2>Classes</h2>
<p class="numberOne">Class Number One</p>
<p class="numberOne numberTwo">Two Classes Here</p>
<p id="idOne">You can use an id twice, but it's best not to. It should be used mostly for targeting specific items.</p>
</div>
</body>
</html>