maki
maki

Reputation: 621

Why is CSS style specfiied by the "initial" keyword different from the default style?

I am reading MDN tutorials of CSS inheritance. It says set initial to property reverts the style to the browser's style. I think the browser's style it what it displays with no CSS at all? But it is different. So zero-CSS style is not controlled by the browser?

https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance

enter image description here

Upvotes: 5

Views: 104

Answers (1)

Yosef Tukachinsky
Yosef Tukachinsky

Reputation: 5895

The initial value reset the style to its very initial state. the blue color of the link is not it's original style, but this style given it from the browser user agent. but the initial reset it to the original color, which it black;

the styles given to <code>a</code> from the <code>browser user-agent</code>

In the image above: The styles given to a from the browser user-agent

Upvotes: 3

Related Questions