I have a simple layout where I want the text red if it is not in the footer
element. It works with p
tags, a
tags etc.
But when I try it with footer
tag it doesn't work.
My code is below:
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>