LukeV Posted April 7, 2008 Share Posted April 7, 2008 I'm trying to validate my website here but I get 6 errors, which practically say the same thing about different elements I have laying around. Here's one: Line 18, Column 10: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.<label>Username: </label><input type="text" name="username" value=""/>I'm not very good at understanding the errors here. What did I do wrong? Link to comment Share on other sites More sharing options...
jesh Posted April 7, 2008 Share Posted April 7, 2008 You might try wrapping your label + input into a div: <div><label>Username: </label><input type="text" name="username" value=""/></div> Labels and inputs are inline elements and, according to the validator, ought to be inside of a block element (p, h1, h2, ..., div, etc.). Link to comment Share on other sites More sharing options...
LukeV Posted April 7, 2008 Author Share Posted April 7, 2008 You might try wrapping your label + input into a div:<div><label>Username: </label><input type="text" name="username" value=""/></div> Labels and inputs are inline elements and, according to the validator, ought to be inside of a block element (p, h1, h2, ..., div, etc.). Ah ok. Thanks! That fixed most of the errors. Still have two left though.Line 37, Column 29: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag.<ul class= "todo">andLine 48, Column 14: document type does not allow element "h2" here; missing one of "object", "ins", "del", "map", "button" start-tag.<p><h2>Looking for a Designer?</h2></p>No idea what's wrong :\ Link to comment Share on other sites More sharing options...
Ingolme Posted April 7, 2008 Share Posted April 7, 2008 Line 37: You can't put a <ul> element inside a <p> element.Line 48: You can't put an <h2> element inside a <p> element. Link to comment Share on other sites More sharing options...
LukeV Posted April 7, 2008 Author Share Posted April 7, 2008 Line 37: You can't put a <ul> element inside a <p> element.Line 48: You can't put an <h2> element inside a <p> element.Right! Thanks guys you made me valid again Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.