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 Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Anchor Tags

</div> and </main> high light red

When I add the <img src="images/me.png" alt="Drawing of Ambrose Hussain" class="profile-image"> to the code the </div> and the </main> tags highlight red, but the code still works with the image being in the text.

Do you have an opening <div> before your image that matches the </div> in red? HTML runs even if it doesn't have all of its opening and closing tags.

1 Answer

Steven Parker
Steven Parker
229,744 Points

The red highlight would generally mean an unmatched tag, and since neither <div> or <main> have any effect on the appearance by themselves, you could be missing the opening tags as db30 suggested.

Another possible cause is if the tags were overlapping, as if the ending tag order was not the opposite of the starting tag order.

In any case, if you still have trouble, post your code or a link to you workspace snapshot.