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

HTML

what 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!

Can you give an example of how font-color can change the color of text?

3 Answers

Hi, 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. :)

thanks for your help.

Hello, 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 :)

sorry i mean font-color and color.

Hi 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.

font-size

color

i mean font-color and color.