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

Heather Johnson
1,201 PointsWhy is the markup validator telling me I have a stray end tag?
Here's what I have:
<footer> <a href="http://twitter.com/formida42"><img src="twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/formida42"><img src="facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2014 Heather Johnson.</p> </footer>
And here's what it's telling me:
Line 66, Column 15: Stray end tag footer. </footer>

Heather Johnson
1,201 PointsThank you. I think I remember seeing that and not reading it at some point.
<footer>
<a href="http://twitter.com/formida42"><img src="twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="http://facebook.com/formida42"><img src="facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2014 Heather Johnson.</p>
</footer>

Jason Anello
Courses Plus Student 94,610 PointsI'm not seeing anything with that code.
Go ahead and post all of the html and also let us know what line is line 66.

Heather Johnson
1,201 PointsLine 66 is the </footer> tag.
I'm sure there are other problems with this, but I'm working through them one-by-one.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Heather Johnson - Future Web Developer</title>
<link rel="stylesheet" href="normalize.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,600,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="responsive.css">
/* Below makes mobile styling viewable on mobile devices */
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Heather Johnson</h1>
<h2>Future Web Developer</h2>
</a>
<nav>
<ul>
<li><a href="index.html" class="selected">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<ul id="gallery">
<li>
<a href="numbers-01.jpg">
<img src="numbers-01.jpg" alt=">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="numbers-02.jpg">
<img src="numbers-02.jpg" alt=">
<p>Playing with blending modes in Photoshop</p>
</a>
</li>
<li>
<a href="numbers-06.jpg">
<img src="numbers-06.jpg" alt=">
<p>Trying to create an 80s style of glows</p>
</a>
</li>
<li>
<a href="numbers-09.jpg">
<img src="numbers-09.jpg" alt=">
<p>Drips created with Photoshop</p>
</a>
</li>
<li>
<a href="numbers-12.jpg">
<img src="numbers-12.jpg" alt=">
<p>He types fast.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/formida42"><img src="twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="http://facebook.com/formida42"><img src="facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2014 Heather Johnson.</p>
</footer>
</div>
</body>
</html>
5 Answers

Jason Anello
Courses Plus Student 94,610 PointsFor each of your 5 images in the gallery you're missing the closing quote on the alt attribute.
You have this:
<img src="numbers-01.jpg" alt=">
Should be this:
<img src="numbers-01.jpg" alt="">
Go ahead and fix that for all 5 images in the gallery. Then run it through the validator again and see if there are any more errors.
What's happening is that because you're not closing off your alt attribute the opening <footer>
tag is treated as part of the alt attribute for your 5th image and so the browser doesn't see an opening footer
it only sees the closing </footer>
and so you get the message "stray end tag footer"
Also, do you have your css files and images all in the same folder with your html files? For organizational purposes you should put them in sub-folders.

fdipganads
13,401 PointsJason, you are right, the " is missing. Great answer!

Lucas Krause
19,924 PointsBTW: While using text nodes containing /* ... */
is perfectly valid HTML you aren't creating comments which is your intention I guess.
You can use multiline /* ... */
comments in CSS, JavaScript, PHP and many other languages but the only comment style available in HTML is <!-- ... -->
. Comments in HTML aren't interpreted or printed to the screen.

Heather Johnson
1,201 PointsOops. I pasted the html, but you can't read it.

Heather Johnson
1,201 PointsThanks, guys! I had noticed the missing quotation marks, but when I added them in the workspace, something else below was highlighted in red. Don't know why. But the validator likes it now, so it seems to be fixed.

annanekrylova
15,751 PointsThanks. Really helped me.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Heather,
See this link for how to post code correctly: https://teamtreehouse.com/forum/posting-code-to-the-forum