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

HTML How to Make a Website Creating HTML Content Use the Navigation Element

Why does adding an anchor element in the workspace change the way the program auto indents and auto codes closing tags?

After I add the

<a href="index.html>

anchor element and close it with

</a>

in the workshop, hitting enter to write a new line of code no longer auto indents lines of code. Also the workshop is designed to auto close tags. Example: when I type <h1>, the system automatically adds the closing tag </h1> so I don't have to. Since I have added the

<a href="index.html> </a> 

anchor element to my document, it automatically adds </a> after I start a new tag. For instance, now when I type <h1>, instead of auto coding the closing tag with </h1> to show

<h1></h1>

it looks like this instead.

<h1></a>

MODERATOR EDIT Formatted code/question for optimal viewing in the community forum.

Steven Parker
Steven Parker
231,269 Points

Try adding your example again, it doesn't seem to show up.

1 Answer

sergio leandro
sergio leandro
1,337 Points

you are missing the " after html. i had the exact same problem.

Thanks for the response! I actually did have the quotations in the right places. I ended up getting past it by manually writing the closing tag first and then going back and writing the anchor. It was weird. It did the same thing again a little bit later and I used the same technique to make it work. I have since added several more anchors and it has not happened again.