Level 1 - Select the PlatesΒΆ
Question
Type SelectorΒΆ
A {} <- demonstrational do not add.
Select elements by their type A.
Selects all elements of type A.
Type refers to the type of tag, so div, p and ul are all different element types.
![[CSS-Diner-Double-Plate.png]]
Answer
plate
Level 2 - Select The Bento BoxesΒΆ
Question
Type SelectorΒΆ
Select elements by their type A.
Selects all elements of type A. Type refers to the type of tag, so div, p and ul are all different element types.
![[CSS-Diner-Double-Bento.png]]
bento
Level 3 - Select The Fancy PlateΒΆ
Question
Select elements with an IDΒΆ
#id
Selects the element with a specific id. You can also combine the ID selector with the type selector.
![[Pasted image 20261028231247.png]]
#fancy
Level 4 -Select The Apple On The PlateΒΆ
Question
Select an element inside another elementΒΆ
A B
Selects all B inside of A B is called a descendant because it is inside of another element.
![[Pasted image 20261028231543.png]]
plate apple
Level 5 - Select The Pickle On The Fancy PlateΒΆ
Question
Combine the Descendant & ID SelectorsΒΆ
#id A
You can combine any selector with the descendent selector.
![[Pasted image 20261028232143.png]]
<div class="table">
<bento>
<orange />
</bento>
<plate id="fancy">
<pickle />
</plate>
<plate>
<pickle />
</plate>
</div>
#fancy pickle
Level 6 - Select All The Small Apples'ΒΆ
Question
Class SelectorΒΆ
.classname
The class selector selects all elements with that class attribute. Elements can only have one ID, but many classes.
![[Pasted image 20261028232705.png]]
<div class="table">
<apple />
<apple class="small" />
<plate>
<apple class="small" />
</plate>
<plate />
</div>
.small
Level 7 - Select The Small OrangesΒΆ
Question
Combine the Class SelectorΒΆ
A.className
You can combine the class selector with other selectors, like the type selector.
![[Pasted image 20261028232954.png]]
<div class="table">
<apple />
<apple class="small" />
<bento>
<orange class="small" />
</bento>
<plate>
<orange />
</plate>
<plate>
<orange class="small" />
</plate>
</div>
orange.small
Level 8 - Select The Small Oranges In The BentosΒΆ
Question
You can do it...ΒΆ
Put your back into it!
Combine what you learned in the last few levels to solve this one!
![[Pasted image 20261028233229.png]]
<div class="table">
<bento>
<orange />
</bento>
<orange class="small" />
<bento>
<orange class="small" />
</bento>
<bento>
<apple class="small" />
</bento>
<bento>
<orange class="small" />
</bento>
</div>
bento orange.small
Level 9 - Select All The Plates & BentosΒΆ
Question
Comma CombinatorΒΆ
Combine Selectors with commas.
A, B
Thanks to Shatner technology, this selects all A and B elements. You can combine any selectors this way, and you can specify more than two.
![[Pasted image 20261028233641.png]]
<div class="table">
<pickle class="small" />
<pickle />
<plate>
<pickle />
</plate>
<bento>
<pickle />
</bento>
<plate>
<pickle />
</plate>
<pickle />
<pickle class="small" />
</div>
plate, bento
Level 10 - Select All The Things!ΒΆ
Question
The Universal SelectorΒΆ
You can select everything!
*
You can select all elements with the universal selector!
![[Pasted image 20261028233937.png]]
<div class="table">
<apple />
<plate>
<orange class="small" />
</plate>
<bento />
<bento>
<orange />
</bento>
<plate id="fancy" />
</div>
*
Level 11 - Select Everything On A PlateΒΆ
![[Pasted image 20261028234153.png]]
<div class="table">
<plate id="fancy">
<orange class="small" />
</plate>
<plate>
<pickle />
</plate>
<apple class="small" />
<plate>
<apple />
</plate>
</div>
plate *
Level 12 - Select Every Apple That's Next To A PlateΒΆ
Question
Adjacent Sibling SelectorΒΆ
Select an element that directly follows another element.
A + B
This selects all B elements that directly follow A. Elements that follow one another are called siblings. They're on the same level, or depth.
In the HTML markup for this level, elements that have the same indentation are siblings.
![[Pasted image 20261028234339.png]]
<div class="table">
<bento>
<apple class="small" />
</bento>
<plate />
<apple class="small" />
<plate />
<apple />
<apple class="small" />
<apple class="small" />
</div>
plate + apple
Level 13 - Select The Pickles Beside The BentoΒΆ
Question
General Sibling Selector
Select elements that follows another element,
A ~ B
You can select all siblings of an element that follow it. This is like the Adjacent Selector (A + B) except it gets all of the following elements instead of one.
![[Pasted image 20261028235628.png]]