In my simple design, I have specified that text should appear in red unless it is within a footer
element. This style is applied successfully to p
tags, a
tags, and others.
However, for some reason, the styling does not work when I target the footer
tag.
Here is the code snippet:
p {
color: #000000;
}
:not(footer) {
color: #ff0000;
}
<h1>This is a heading</h1>
<footer>This is a footer.</footer>
<div>This is some text in a div element.</div>
<a href="https://www.w3schools.com" target="_blank">Link to W3Schools!</a>