<main>
<div class="wrapper">
<article class="flow">
<h1>Matching specificity</h1>
<figure class="callout">
<p>The second CSS rule wins because it gets an extra 1 point of specificity.</p>
</figure>
<button class="my-button" onclick="alert('hello')">Click me</button>
</article>
</div>
</main>
.my-button {
background: blue;
}
button[onclick] {
background: grey;
}
This Pen doesn't use any external JavaScript resources.