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 trialDon Mabry
3,679 Pointstargeting class main-heading
its asking me to target the heading with a class selector and I wrote out the code .main-header { font-size 72px; }
inside of the h1 tag what am I doing wrong?
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header id= "top" class= "main-header">
<span>Journey through the Sierra Nevada Mountains</span>
<h1 class= "main-heading"> 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>
<div>
<h2>Check out all the Wildlife</h2>
<p>
As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles.
</p>
<a href="#">See the Wildlife</a>
</div>
</body>
</html>
/* Complete the challenge by writing CSS below */
.main-header {
background-color: orange;
}
3 Answers
Angela Visnesky
20,927 PointsHi Don, You have a space that shouldn't be there.
<header id= "top" class= "main-header">
It should read:
<header id="top" class="main-header">
The challenges can be really picky. I hope this helps!
Don Mabry
3,679 PointsThis is not my problem that part of the code was correct my problem is where and how do I set the heading to a class selector and set a font to 72px?
Tushar Singh
Courses Plus Student 8,692 PointsCheck my code.
LaToya Legemah
12,600 PointsTushar Singh is correct I think. It looks like you are changing .main-header instead of .main-heading
Craig Watson
27,930 PointsHi Don,
Just picked up your answer request.
From the code above it does look like you have a couple of spaces in the HTML that would cause errors even if you had the selector correct however as mentioned above the way to set the font size for your H1 with the class main-heading is as follows:
.main-heading {
font-size: 72px;
}
If you already had this and it was not working the reason will be the spaces in the HTML.
Hope this helps and sorry for the delay in getting back to you.
Craig
Tushar Singh
Courses Plus Student 8,692 PointsTushar Singh
Courses Plus Student 8,692 Pointschange the font size of main-heading() not the main-header.