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
Foday Kromah
Courses Plus Student 963 PointsHTML-adding a headline
Is this not how you add a headline, right after the body? <body> text here</body> <h1>Once Upon a Time</h1>?
Foday Kromah
Courses Plus Student 963 PointsExcellent! Thank you, Charles Kenney. So is what and how I'm in putting the code incorrect? "<body> <h1>Once Upon a Time</h1>
Foday Kromah
Courses Plus Student 963 PointsThe quiz is saying how I'm inputting the tag is incorrect and I've tried moving spaces and proper alignment and nothing seems to take.
Foday Kromah
Courses Plus Student 963 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title><Once Upon a Time</title> <style> h1 {text-align:left; color:green} </style> </head> <meta charset="utf-8"> <title><Once Upon a Time</title> <style> h1 {text-align:left; color:green} <style> <body> <h1>Once Upon a Time</h1> <----I DID THIS Blah Blah Blah </body> </html>
3 Answers
Charles Kenney
15,604 PointsThere are a few errors in your html. I'm going to try my best to sort them out for you!
This is the HTML you gave me:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><Once Upon a Time</title> You left a stray tag opening after your closing title tag
<style> h1 {text-align:left; color:green} </style> you did a great job with implementing this css
</head>
<body>
<h1>Once Upon a Time</h1> <----I DID THIS Blah Blah Blah <!--you did not comment correctly, this is an example-->
</body>
</html>
If we format the html correctly and apply the suggested changes, we get this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
h1{
text-align:left;
color:green
}
</style>
</head>
<body>
<h1>Once Upon a Time</h1> <!--I did this blah blah blah -->
</body>
</html>
Here is a screenshot of the example HTMLs output.
Let me know if you need anything else! -Charles
Jennifer Nordell
Treehouse TeacherHi Charles! I'm changing your comment to an answer so that the question can be marked in the forums as "answered" and so that it may be eligible for voting/best answer assignment
Charles Kenney
15,604 Pointsoops. Thanks Jennifer!
Foday Kromah
Courses Plus Student 963 PointsCheers, Charles Kenny!. I will try this again with your suggestions.
Foday Kromah
Courses Plus Student 963 PointsI understand now that I simply needed to input the information within the body. Great! explanation, Charle Kenneys. I shall continue my path, speak again soon I hope.
Charles Kenney
15,604 PointsCharles Kenney
15,604 PointsFoday, The body tags of an html file should encompass all viewable content displayed by the browser. Here is an example:
Hope this helps! -Charles