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 trialJacob Hieter
3,400 PointsThe different spellings of "Gray" or "Grey"
While using the color for light gray (or grey) in CSS without using the hex value what is the best spelling to use for gray. When you say something is grayed out you use the A and not the E version. Spell checkers do not recognize the E version of grayed out. So what is the best spelling to use for gray in CSS?
4 Answers
Stacey Lane
UX Design Techdegree Student 757 PointsGrey is the European spelling whereas Gray is the American spelling. (One way to remember: E for Europe, A for America).
That being said, Gray is the proper spelling for code stuffs: http://www.crockford.com/wrrrld/color.html
Michael Brown
7,431 PointsYou can use either “gray” or “grey” if your browser is CSS3 compliant. I checked it out on my Chrome 43.0.2357.124 m — and both “gray” and “grey” displayed the same.
HTML Element Names, Attributes, CSS Properties, Key Words, etc., are specified in standards documents produced by the W3C that rise to the level of a “Recommendation”. The browser companies use the names, keywords, etc. that are defined in these documents.
Seventeen (17) color names were defined in CSS 2.1 (2011) in section 4.3.6, and one of them was “gray” (not “grey”).
In CSS 3 (2011) Color Module Level 3, in section 4.1 the list of “Basic” named colors was reduced to Sixteen (16) — I have no idea what they had against “orange” — and 130 “Extended” color keywords were added, including — wait for it — alternate spellings for the “grays”.
A CSS3 browser will support either:
- darkslategray or darkslategrey,
- dimgray or dimgrey,
- gray or grey,
- lightgray or lightgrey,
- lightslategray or lightslategrey,
- slategray or slategrey
Jacob Hieter
3,400 PointsThank you Michael for the links. To find out, in the newer version I can use both spellings. I got used to using the A version due to the spell check issue mentioned above. Now when I follow the instruction videos I know that I can use both spellings to obtain the same results.
Just a funny little tidbit. Apparently in Power Rangers there has never been an orange ranger. I guess they kind of hate that color as well. Just try to find something that rhymes with that color too.
Christopher Sea
3,726 PointsGrey= D3D3D3 - 211 211 211
Gray= 808080 - 128 128 128
Abdullah Hulayyil
8,737 Points"gray". just like we use "color:" instead of "colour:".
Jacob Hieter
3,400 PointsJacob Hieter
3,400 PointsThank you Stacy for the color cart link. I was never taught that the E spelling of Grey was European and the A spelling was American. I am thankful that you shared it with me.