0

div style="background-color:grey; color:red; padding:20px;">

please explain me this code why insted of "colour" we cannot write "textcolour". its confusing!

3rd Feb 2017, 11:44 AM
kumar badal
kumar badal - avatar
3 odpowiedzi
+ 3
simply because there is no attribute textcolor in HTML or CSS. the attribute is called color. seeing there's background-color and border-color, I understand that it's confusing. I always wondered why there's no font-color. maybe it's because of simplicity.
3rd Feb 2017, 12:04 PM
Mario L.
Mario L. - avatar
+ 1
thnks @mario it really helped me
3rd Feb 2017, 12:29 PM
kumar badal
kumar badal - avatar
+ 1
Because the language was made in the USA. Color is American English for Colour in plain English.
3rd Feb 2017, 1:41 PM
koder
koder  - avatar