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

CSS How to Make a Website Beginning HTML and CSS Follow Along with Workspaces

When I go to preview my work it has the h1 tags and not just my name why is this?

I have typed in the correct code "<h1>Harry Kilsby</h1>.

Hi Harry, can you post your code please? I also don't quite understand your question. Do you mean that on your live preview it is only showing you the h1 tags (<h1>) and your name is not there?

Sam Baines
Sam Baines
4,315 Points

Hi Harry - some people are seeming to find this as an issue for preview in the first section of the challenge - apparently if you continue onto the second part of the task and continue along then next section it sorts itself out so just keep moving along and see I guess.

2 Answers

John Ambrose
John Ambrose
7,216 Points

I'm using a mac and Safari, but it appears that the preview window needs to HTML element before it recognizes the code as valid. I'm sure they cover this later, however if you just can't wait adjust your code like this:

<html>
    <h1>New Guy</h1>
</html>

This is a sandboxed environment (aka self contained[for our safety!]) so it isn't as flexible as a full browser.

Thank you John, it worked!!

I was having the same problem on a Mac running Safari. The HTML element solved it - thank you so much, John! :)

Hi Harry

Sam has a point. I've seen preview do some goofy things. If possible, ensure that your h1 tags are properly closed as well (see below).

<h1></h1>