Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Ryan Burke
Ryan Burke
9,976 Points

My background won't change to orange

I have scanned my code multiple times and can't seem to find the problem??

I have this problem too - I've checked my code 4 of 5 times now, and deleted and recreated my main.css file, and it still won't change to orange :-(

2 Answers

Arman Arutyunov
Arman Arutyunov
21,900 Points

Could you please share your code? Otherwise, it will be impossible to help you.

Hello Arman, this is the code I wrote, @Ryan Burke - was your code the similar?

My code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Henry Brenton | Learner</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html"> <h1>Henry Brenton</h1> <h2>Learner</h2> </a>

Arman Arutyunov
Arman Arutyunov
21,900 Points

First of all, in the code you shared you didn't close header, body and html tags. It should look like this

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title>Henry Brenton | Learner</title> 
    <link rel="stylesheet" href="css/normalize.css"> 
    <link rel="stylesheet" href="css/main.css"> 
</head> 
<body> 
    <header> 
        <a href="index.html"> 
            <h1>Henry Brenton</h1> 
            <h2>Learner</h2> 
        </a>
    </header>
</body>
</html>

And secondly, you are referring to a background color but you didn't show the css code. To change your background color you need to either add a style property to the body tag in the html file like this:

<body style="background-color: #f75f1c;"> 

or do it in the css file like this:

body {
    background-color: #f75f1c;
}