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 Build a Simple Website Styling Content Fonts and Colors

Where the HEX do I put this?

I'm lost. I don't exactly recall where I'm supposed to place the HEX designations.

//Mike

on a color attribute...

div { color: #fafafa; }

6 Answers

Are you working on the Fonts & Colors code challenge? Your color codes will go in the style.css file. For setting font colors, you can just use the color attribute, such as:

color: #000000;

for setting the font to black. You can set the color right after you set the font-family.

Under the font-family line in style.css type:

font-color: #FAF3BC;

Under the font-family line in style.css type:

font-color: #FAF3BC;

If you're talking about using hex codes as colours in CSS, simply replace your colour short code (e.g. Black) with the hex code (e.g. #000000).

So your CSS might look like this: body { background-color: #000000; }

Check out the colour values video in the CSS deep dive for more: http://teamtreehouse.com/library/css-foundations/values-and-units/color-values-2

You can put hex in almost all the properties that needs color definitions example

Inline Examples <p style="color:#000000;"></p> <p style="background-color:#000000;"></p> also can be used for border-color

in css sheet

p{ color:#000000; background-color:000000; }

Y#ffff can use the hex before a color for example background-color: #000;

It can also be used in css when adding styles to a div id. For example:

wrapper {

   bacground-color: #fff;

}