190k views
5 votes
The color property is inherited by all text elements except links (the a element)

1 Answer

5 votes

That is correct.

Color inheritance works for all text elements except <a> links by default.

So these would inherit their color:

<h1> <p> <span> etc...

But <a> links will not.

You can, of course, explicitly set a color on <a> links if you wanted to. Inheritance just doesn't happen automatically for those elements.

This is by design, to leave <a> links unstyled by default, so they can indicate navigability clearly. But you're free to style them like any other element.

User Nau
by
8.4k points