1Select an element with the ID "id" and the class "class":
2#id.class {
3}
4example:
5<div>
6 <strong id="id" class="class">
7 Foobar
8 </strong>
9 <strong class="class">
10 Foobar
11 </strong>
12</div>
13=> Will select the first <strong> element
14
15Select all elements with the class "class",
16which are decendents of a element with an ID of "id":
17#id .class {
18}
19example:
20<div id="id">
21 <strong class="class">Foobar</strong>
22</div>
23=> Will select the <strong> element
1/*put a # infront of the id*/
2/*<section id="example"></section>*/
3#example{
4 margin: auto;
5}
1<style>
2 #selector {
3 color: red;
4}
5/* # is id selector */
6</style>
7
8
9<div id="selector">
10<p>This is an id</p>
11</div>
12
13