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!
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
Jeremy Solomon2,276 Points
HTML Validation Error: section lacks header
There is a similar question for this, however, its not fully explained. I am following the tutorial exactly and in the html testing phase. When going to validator.w3.org/check, it tells me that there is an error relating to the google fonts we used.
Line 27, Column 15: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.
My code from the error section: <head> <meta charset="utf-8"> <title> Jeremy Solomon | Designer </title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <meta name="viewport" content="device-width, initial-scale=1.0"> </head>
Here is my question: Based on the other forum answer on teamtreehouse and some googling, it appears that the tutorial code is not valid, but possibly was when the video was made. Can anyone confirm this? It looks like I need to rearrange a few items, i'm just trying to confirm why. Thank you.
Joshua Ferdaszewski12,716 Points
I have seen this same error when using Google fonts. It is because of the | character ('pipe' the one above the enter key normally). It is not a valid character for a URL and needs to be escaped. Replace the | in your code with
%7C and that error should be fixed. The heading thing is usually just a warning/suggestion, not an actual error.
Web standards are always in flux and since the advent of HTML5 and CSS3, we are in a transition period where there are disconnects between the standards, how browsers support features, and what developers actually do in practice. I hope that helps you out and good luck learning HTML!