Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![dzttnnlmgq](https://secure.gravatar.com/avatar/184e1e6af3d7f4d2f9e453500aede19f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
dzttnnlmgq
2,432 Pointscolor: initial; vs color:black;
Hello,
In the video https://teamtreehouse.com/library/css-basics/fundamental-concepts/inheritance, Guil is talks about inheritance. He states that you can tell the browser to ignore inheritance with color: initial. In this particular scenario, it sets the color to black, if you want the text to appear black why would you opt for color: initial; over color: black; in this particular scenario?
(likewise, why would you use color: initial; over color: [hex/rgb/color name]; if the desired color is the same?)
I cannot see it being used in this particular scenario (or many at all) as it does not save multiple lines of code, they are both simply one line, which leads me to the question, is it based on preference?.
Thanks, Leon.
2 Answers
![joelearner](https://secure.gravatar.com/avatar/a5703818e469ebdc1c12cd48a1d671ff?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
joelearner
54,915 PointsHi Leon,
Could it have to do with different browsers? Mozilla, Chrome, IE, Opera, etc have different companies running them or are open source.
It could be that each browser has a different default color so initial takes the color back to the browser default which may not necessarily be black in color.
![dzttnnlmgq](https://secure.gravatar.com/avatar/184e1e6af3d7f4d2f9e453500aede19f?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
dzttnnlmgq
2,432 PointsHello Joe, thanks for the reply!
I understand that they certain browsers' default colors may differ however, in the case that the default is green, my question is, why not just use color: green; instead of color: initial;.
thanks :)
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe choice should be based on intention.
If you want the color to be black, you should set it to black explicitly.
You would use "initial" if you wanted to set it to the color it would have if no value were set for any ancestor it might inherit from. Generally, this happens to be black but that's really up to the browser.
![dzttnnlmgq](https://secure.gravatar.com/avatar/184e1e6af3d7f4d2f9e453500aede19f?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
dzttnnlmgq
2,432 PointsThanks Steven!
Didn't click in my head that even though it would inherit from the browser, that it would show differently on those browsers that do differ. Although nice to know, I doubt I will be using the color: initial; any time soon.
Leon.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsFor color, you might think of "initial" as being the term for "normal".
joelearner
54,915 Pointsjoelearner
54,915 PointsNo problem Leon. That would be something good to research. I guess if the browser default is green, then the command would be redundant. But if the default color was orange (that would be funny!), then you would have to specify green to get green.