jgcalifornia Posted January 31, 2013 Share Posted January 31, 2013 Trying to get a site, page by page validated. <script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>'The language attribute on the script element is obsolete. You can safely omit it.' Everything on the site will function without the use of these scripts? I currently have 4 scripts between the head tags, and unclear as to why i wouldn't need them? Also, it says this error message for all of ym <h> tags. Where else do they go??Element h7 not allowed as child of element div in this context. (Suppressing further errors from this subtree.) <h7>FILM</h7> Appreciate any help. Link to comment Share on other sites More sharing options...
jeffman Posted January 31, 2013 Share Posted January 31, 2013 Omit the language attribute (language="JavaScript") not the script. H elements should come outside div elements. Divs hold content. A header is not content. It labels content. If you are using an H element for something that is not a header, put the text in a text container (like a p or a span) and style it with CSS instead. Link to comment Share on other sites More sharing options...
jgcalifornia Posted January 31, 2013 Author Share Posted January 31, 2013 Thanks for the help.Changing the h tag to a p tag just changed the errors from h to p. Link to comment Share on other sites More sharing options...
jeffman Posted January 31, 2013 Share Posted January 31, 2013 You should post more HTML, or provide a link. We might have to see a lot of it to see what the "context" is. Normally a p is allowed in a div. I suspect the p is wrapped in an inline element like an <a> or a <li> or something similar. I don't know why the error refers to the div, though. Seeing more HTML would be helpful. Link to comment Share on other sites More sharing options...
jgcalifornia Posted January 31, 2013 Author Share Posted January 31, 2013 Your span advice did the trick for that. Just would like to know why span would work, but not p or h. I attached the page so you can view the code. page.html Link to comment Share on other sites More sharing options...
jeffman Posted January 31, 2013 Share Posted January 31, 2013 I'm using http://validator.w3.org . I'm assuming you posted the corrected HTML. I can duplicate the error if I replace the span elements with h7 elements, but not with p elements. I suspect the real objection to the h7 is that such an element doesn't exist. (Egg on my face!) Headers go from h1-h6. I'm not sure why it didn't just say that. And as I said, I did not get an error when I replaced the h tags with p tags. FWIW, if you are using all those <br> elements to create space, you might consider using CSS margins or padding instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now