Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS 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
217,443 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.