// Trying to match
// #happy-cake
<!-- WILL match -->
<div id="happy-cake"></div>
<!-- WILL match -->
<aside id="happy-cake"></aside>
<!-- Will NOT match -->
<div id="sad-cake">Wrong ID!</div>
<!-- Will NOT match -->
<div class="happy-cake">That's not an ID!</div>// Trying to match
// .module
<!-- WILL match -->
<div class="module"></div>
<!-- WILL match -->
<aside class="country module iceland"></aside>
<!-- Will NOT match -->
<div class=".module">The dot is for CSS, not HTML</div>
<!-- Will NOT match -->
<div class="bigmodule">Wrong class</div>// Trying to match
// h2
<!-- WILL match -->
<h2>Hi, Mom</h2>
<main>
<div>
<!-- WILL match -->
<h2>Anywhere</h2>
</div>
</main>
<!-- Will NOT match -->
<div class="h2">Wrong tag, can't trick it</div>
<!-- Will NOT match -->
<h2class="yolo">Make sure that tag has a space after it!</h2>// Trying to match
// div[data-modal="open"]
<!-- WILL match -->
<div data-modal="open"></div>
<!-- WILL match -->
<aside class='closed' data-modal='open'></aside>
<!-- Will NOT match -->
<div data-modal="false">Wrong value</div>
<!-- Will NOT match -->
<div data-modal>No value</div>
<!-- Will NOT match -->
<div data-modal-open>Wrong attribute</div>// Trying to match
// h2[rel="external"]
<!-- WILL match -->
<h1 rel="external">Attribute Equals</h1>
// Trying to match
// h1[rel*="external"]
<!-- WILL match -->
<h1 rel="xxxexternalxxx">Attribute Contains</h1>
// Trying to match
// h1[rel^="external"]
<!-- WILL match -->
<h1 rel="external-link yep">Attribute Begins</h1>
// Trying to match
// h1[rel~="external"]
<!-- WILL match -->
<h1 rel="friend external sandwich">Attribute Space Separated</h1>
// Trying to match
// h1[rel|="friend"]
<!-- WILL match -->
<h1 rel="friend-external-sandwich">Attribute Dash Separated</h1>
<!-- WILL NOT match -->
<h1 rel="friend2-external-sandwich">Attribute Dash Separated</h1>
// Trying to match
// :nth-child(2)
<ul>
<li>nope</li>
<!-- WILL match -->
<li>yep, I'm #2</li>
<li>nope</li>
</ul>https://flukeout.github.io/