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 trialClaude Neves
3,629 PointsTrouble finding the error!
Can anyone help finding the error here:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Claude Neves's Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css?family=Muli%7CRoboto:400,300,500,700,900" rel="stylesheet">
<body>
<div class="main-nav">
<ul class="nav">
<li class="name">Claude Neves</li>
<li><a href="index.html">Home</a></li>
<li><a href="gallery.html">Gallery</a></li>
</ul>
</div>
<section>
<ul id="gallery">
<li>
<a href="images/welcomePhoto.jpg">
<img src="images/welcomePhoto.jpg" alt="welcomePhoto">
<p>"the Woolgatherer”-2006</p>
</a>
</li>
<li>
<a href="images/CA2000.JPG">
<img src="images/CA2000.JPG" alt="CA2000">
<p>“Teenage Confessions” - 2000-06</p>
</a>
</li>
<li>
<a href="images/BigEyes.jpg">
<img src="images/BigEyes.jpg" alt="BigEyes">
<p>“Blue Eyes”</p>
</a>
</li>
<li>
<a href="images/Pop102.jpg">
<img src="images/Pop102.jpg" alt="Pop102">
<p>"POP 102"</p>
</a>
</li>
</ul>
</section>
<footer>
<ul>
<li><a href="https://twitter.com/clnev" class="social twitter">Twitter</a></li>
<li><a href="https://www.linkedin.com/in/claudeneves" class="social linkedin">LinkedIn</a></li>
<li><a href="https://github.com/cldnev" class="social github">Github</a></li>
</ul>
<p class="copyright">Copyright 2016, Claude Neves</p>
</footer>
</body>
Claude Neves
3,629 PointsThere is an error, when I go thru W3 validation they say about h2 errors!
Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. From line 19, column 5; to line 19, column 13 div>↩↩ <section>↩
Austin Whipple
29,725 PointsFormatted your code a bit! Be sure to check out the Markdown Cheatsheet located below the text editor for help.
2 Answers
Russell Sawyer
Front End Web Development Techdegree Student 15,705 PointsI was trying to work through it but you're missing several closing element tags and there is no header tag.
When I build a webpage I write all the open and corresponding closing elements first so I don't forget any and I can get all the indentation correct. You can still do that and then copy and paste in the content.
Claude Neves
3,629 PointsThanks! Russell
srikarvedantam
8,369 PointsHi Claude,
What you are seeing is just a warning, but not an error as such. To explain the nature of this warning, imagine yourself reading a newspaper. When you come across some text in a section of newspaper, won't you glance above to find some heading that briefly describes what that section is all about. In a similar fashion, the <section> you defined in your HTML document lacks an heading and hence, you are seeing this warning. As you might have guessed by now, fix is simply including a heading within your section as below:
<section>
<h2>My Gallery</h2>
<ul id="gallery">
...
</ul>
</section>
The above fix should get rid of the warning you are encountering and your document should get evaluated as a valid HTML5 document.
Cheers!
Claude Neves
3,629 PointsCool!
jag
18,266 Pointsjag
18,266 PointsWhat type of error are you looking for?