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
James Bryer
656 PointsWhy is the header not working??!
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> </head> </html>
8 Answers
Melanie Day
5,540 PointsHi James, No problem.
So
1 - Open Sublime Text 2
2 - Copy and paste the code below into a new file:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Smells Like Bakin' Cupcake Company</title>
</head>
<body>
</body>
</html>
3 - Choose: file > save as
4 - Name your file: index.html (you must specify the file extension here) Save this to your desktop
5 - Locate the index.html file that you have just saved to your desktop and either double click and it will open in your default browser, or right click > open with > select your browser of choice.
This should open a blank page in your browser but the tab at the top of the page should display the text 'Smells Like Bakin' Cupcake Company'.
Let me know if this works. If not you can send me your file and I can take a look at it :)
James Bryer
656 Points<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> </head> </html>
sorry was meant to put this...
Melanie Day
5,540 PointsIs it a title or h1 that you are trying to add to your page?
Adding 'Smells Like Bakin' Cupcake Company' as the title (this is what appears in the browsers tab).
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Smells Like Bakin' Cupcake Company</title>
</head>
<body>
</body>
</html>
Adding 'Smells Like Bakin' Cupcake Company' as the title and a h1 on the page.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Smells Like Bakin' Cupcake Company</title>
</head>
<body>
<h1>Smells Like Bakin' Cupcake Company</h1>
</body>
</html>
James Bryer
656 PointsHey melanie thanks again,
I am just trying to get the title in the browser to work but it won't. I am doing the first one just like you but it just comes up with the file location. Additionally the colors for title is pink/red?
Thanks, James
Melanie Day
5,540 PointsHi James, if you were to copy and paste my first example of code into a program such as 'Sublime Text 2' and save it somewhere as 'index.html' and then open this file in a browser it should work correctly. Let me know what programme and browser you are using if this does not help.
James Bryer
656 PointsHey melanie,
It seems that nothing i do in this file has any effect when i open it up on the browser. My other version of this worked perfectly though really weird! and i am using sublime 2 and firefox.
Thanks.
Melanie Day
5,540 PointsHi James, I have also used Sublime Text 2, opened it in Firefox and I can see the title of 'Smells Like Bakin' Cupcake Company' in my browsers tab so I am unsure of what is going wrong :/ Have you saved the file with the correct extension of .html?
James Bryer
656 PointsI'm really not sure! So confused!
is there any chance you could give me a step by step instruction on how to create the right type of file on a macbook?
James,
PS thanks again!
James Bryer
656 PointsThank you! :)
do you work for team tree house btw? :)
Melanie Day
5,540 PointsYou're welcome :D Glad you got it.
No, I just signed up about a week ago as I wanted to brush up on some of my skills and learn some new ones. I am always happy to help.
James Bryer
656 PointsThank you! :)
do you work for team tree house btw? :)
James Barnett
39,199 PointsJames Barnett
39,199 PointsMelanie Day - Nice answer! Way to stick with a thread
Melanie Day
5,540 PointsMelanie Day
5,540 PointsThanks James Barnett, I am always happy to help and hope that when I get stuck (which is inevitable), someone would be so kind as to guide me ;)