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 trialStephen Calderon
4,564 PointsWhy is my page showing up blank? Is there something wrong with my code?
Help
Stephen Calderon
4,564 Points<!DOCTYPE html>
<html>
<head>
<title>Combinators</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="main">
<h1>Combinators</h1>
<a href="#">A direct child of .main</a>
<p>
In sit amet consequat dolor. Fusce tempor odio vitae sem elementum, luctus luctus purus iaculis.
</p>
<h2>I am a Heading 2</h2>
<p>
Lorem
</p>
<a href="#">A direct child of .main</a>
<h2>I am a Heading 2 </h2>
<p>
qweqeeeeeeeeeeeeeeeeeeeeeee
</p>
<https://teamtreehouse.com/forum/why-is-my-page-showing-up-blank-is-there-something-wrong-with-my-code#/div>
Stephen Calderon
4,564 Pointsbody {
font: 1.1em/1.5 sans-serif;
padding-top: 20px;
}
.main {
border: 1px solid;
margin: auto;
padding: 10px 20px 20px;
width: 760px;
}
/* Using Combinators */
.main > a {
color: red;
}
Stephen Calderon
4,564 PointsIm noticing my css isnt being added,, Ive saved both in the same folder.
4 Answers
Josh Garofalo
2,049 PointsDid you accidentally forget to close a comment up at the top of your page?
Petar Brkovic
8,651 PointsYou are missing some important tags html, title
Abdullah Binjamea
2,618 PointsI think you forgot to add head tag in your html file, title and link tags should be inside of head tag.
There are also many things that has to be worked out in your HTML source, Let me look that for you.
Abdullah Binjamea
2,618 PointsHere you go! your HTML file nice & clean :)
<!DOCTYPE html>
<html>
<head>
<title>Combinators</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main">
<h1>Combinators</h1>
<a href="#">A direct child of .main</a>
<p>In sit amet consequat dolor. Fusce tempor odio vitae sem elementum, luctus luctus purus iaculis.</p>
<h2>I am a Heading 2</h2>
<p>Lorem</p>
<a href="#">A direct child of .main</a>
<h2>I am a Heading 2 </h2>
<p>qweqeeeeeeeeeeeeeeeeeeeeeee</p>
</div>
</body>
</html>
Joshua Holland
2,865 PointsJoshua Holland
2,865 PointsPlease post your code so we can examine it and let you know the issue. This can be done by typing three tildes right before and after you paste your code. It's the ` button just to the left of the number 1 on your keyboard.