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

CSS CSS Foundations Backgrounds and Borders Background Properties

robinson rathod
robinson rathod
1,508 Points

when i write the code in the exercise i cant see the output. what can i do to see it?

I wanna know how can I view the output of the code I write in the exercise.

5 Answers

Hi Robinson!

First, make sure that your stylesheet is being correctly linked to your html! You should have something similar to the following code inside your pages head element.

<link rel="stylesheet" href="css/main.css"

Also, the code in your CSS file should be roughly similar to the code below. This code changes the background of the site to light blue!

body {
    background-color: lightblue;
}

Hope this helps out!

-Luke

robinson rathod
robinson rathod
1,508 Points

In that case teamtreehouse can take it as a suggestion to make that change so students like me can know what happens when they write the code.. I think it will be very helpful.. thanks for ur reply..

robinson rathod
robinson rathod
1,508 Points

Its attached properly but its not showing the final executed code when i hit preview.. all throughout the exercise i just see the same basic preview .. so i actually don't know whats happening when i write the code. i just get the green sing that the code was correct and i move on.

You mean in the Code Challenges right? At the end of each video?

Usually they have you do what has already been done in the video you watched prior to the exercise.

After each step in the challenge you can see what you did previously by clicking the preview button, but I don't think there's any way to see it in the actual exercise thing unless you do it on the side on your own.

You bet.

Maybe Luke Glazebrook can further elaborate...