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
U Lun Chung
2,294 Pointswhat is difference between font-color and color?
these two elements both can change the color of text. i really don't know . Please help me. thank you!
3 Answers
Rasbin Rijal
Courses Plus Student 10,864 PointsHi, I don't think there is difference in terms of what it does to the font. Both applies color. But, the color attribute has some compatibility issues.
The color attribute of <font> is not supported in HTML5.
I hope this helps. :)
U Lun Chung
2,294 Pointsthanks for your help.
Rasbin Rijal
Courses Plus Student 10,864 PointsHello, U Lun Chung ,
The size attribute specifies the size of the text inside a <font> element.
The color attribute specifies the color of the text inside a <font> element.
You can set the size of the text but not the color of the text with the font-size property. Please feel free to ask if you have any questions.
Happy Learning :)
U Lun Chung
2,294 Pointssorry i mean font-color and color.
Gianmarco Mazzoran
22,076 PointsHi U Lun Chung,
the font-size property specifies the font size of text. The color property set the color of text.
You cannot change the color with the font-size property.
U Lun Chung
2,294 Pointsi mean font-color and color.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsCan you give an example of how font-color can change the color of text?