Link to home
Create AccountLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net 2010 Error "Validation (HTML5): Element 'nav' cannot be be nested within element 'html'"

Hi

I am trying to learn a bit of html5. I created a new ASP.net web application the I changed the Text validation in
Tools/Options/Text Editor/HTML from "XHTML 1.0 Transitional" to "HTML5".
I get the following error in the mark up further down. Have I set this up wrong? I realise that I am shooting in the dark a bit here.

Error: "Validation (HTML5): Element 'nav' cannot be be nested within element 'html'"

My page's mark up code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="HTML5._Default" %>

<!DOCTYPE html>
<html lang="en">  
  <head>    
    <meta charset="utf-8">    
    <title>My Title</title>  
  </head>  
  <nav>
  <ul>
    <li><a href="Default.aspx">Home</a></li>
    <li><a href="Webform1.aspx">Page 1</a></li>
    <li><a href="Webform2.aspx">Page 2</a></li>
  </ul>
</nav>
  <body>

         <!--shorten the link if you are not changing servers-->
     <a href="Webform1.aspx">Page 1</a>

  </body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Murray Brown

ASKER

Thanks very much
Thanks very much