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 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;
}