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 trialBenji Beck
5,238 PointsWhy is my Workspace only displaying the HTML code?
So far I've tried to follow along and write the same code seen in the video but it seems that only the HTML file is being displayed in Workspace preview. What did I miss?
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<span>Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<p>
Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
</p>
<a href="#">Find out more</a>
</body>
</html>
@import "import-styles.css";
body {
text-align: center;
}
h1 {
font-size: 72px;
color: white;
}
header{
background-color: orange;
}
p{
font-size: 20px;
}
Edited by Dane E. Parchment Jr. (Moderator) for readability.
Benji Beck
5,238 PointsHi Dane! Here's what I have so far, sorry the html code is a run-on sentence, I'm unsure how to reformat it. I'll try to check for the possible errors you've mentioned.
Steven Parker
231,236 PointsHey Benji, when posting code, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. Or watch this video on code formatting.
Also, for debugging workspace issues, it can be very helpful to make a snapshot of your workspace and post the link to it here.
Dane Parchment
Treehouse Moderator 11,077 PointsOk so are your html page unstyled, or do you actually want to view both the html and css code?
1 Answer
Steven Parker
231,236 PointsIt's normal for the workspace to display only one file at a time. But you can select one of the open files from tabs across the top, or you can double-click a filename in the left menu to open it.
The workspace preview will open a browser window to show the rendered page. No actual code should be displayed there.
Dane Parchment
Treehouse Moderator 11,077 PointsDane Parchment
Treehouse Moderator 11,077 PointsCan you please provide the code so that we can better debug your issue. It could be due to a myriad of things, including: