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
Max Reinsch
5,740 PointsFirst excercise
<head>
<title> JavaScript Foundations: Variables</title>
<style>
html {
background: #FAFAFA;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>JavaScript Foundations</h1>
<h2>Variables</h2>
<div id="myDiv">
This is a div with the id of "myDiv"
</div>
<script src="myscript.js"></script>
</body>
</html>
And for js:
/* JavaScript Foundations: Variables */
var color = βredβ;
document.getElementById(βmyDivβ).style.background = βblackβ;
When I open the file in Chrome, the Black background doesn't display.
http://s27.photobucket.com/user/MaxReinsch/media/yep.png.html
2 Answers
James Barnett
39,199 PointsYour quote characters are the issue, try retyping them.
dan schmidt
2,576 PointsDoes it work if you open up the javascript console in chrome dev tools and apply the styles manually?

Max Reinsch
5,740 PointsMax Reinsch
5,740 PointsDo you know what the issue specifically was?
I think I wrote some of the code in ms word (for some reason I can't open two notepad docs at the same time) and pasted it into the workspace.
Thanks James, it worked.
James Barnett
39,199 PointsJames Barnett
39,199 Points>think I wrote some of the code in ms wordThat's your issue, your quotes weren't normal quotes they were "smart" quotes which look better typographically but are actually distinctly different characters and those programming languages don't recognize them.
>I can't open two notepad docs at the same timeUse notepad++ instead, it has tabs and syntax highlighting.