Sunamena Posted December 11, 2015 Share Posted December 11, 2015 Greetings all, I have some issues with this HTML.HTML: <!doctype html> <head> <title>Untitled</title> </head> <body> <ul class="headerul"> <li><a href="#top">CANVAS</a></li> <li><a href="#top">kijk online</a></li> <li><a href="#top">programmagids</a></li> <ul class="floatright"> <li><a href="#top">delen</a></li> <li><a href="#top">zoeken</a></li> </ul> </ul> </body> </html> Error code from w3C validator (): Error: Element ul not allowed as child of element ul in this context. (Suppressing further errors from this subtree.) From line 15, column 3; to line 15, column 25 a></li>↩ <ul class="floatright">↩ < Contexts in which element ul may be used: Where flow content is expected. Content model for element ul: Zero or more li and script-supporting elements.What I am trying to do: http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_black_right So how to solve this problem? Part of what was requested was to use only propper HTML, with this validator not showing any errors. And those two items should be floating right. In addition, inline style is not allowed. Is it possible to solve this? Or to create a table for this?Thanks in Advance! Link to comment Share on other sites More sharing options...
dsonesuk Posted December 11, 2015 Share Posted December 11, 2015 Like it says you cant have a ul being a child element of parent ul, it can be a child of li element (within li), or sibling of ul element (beside ul on same level), BUT NOT a child (directly within ul and beside li elements). 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