Avatar of Murray Brown
Murray Brown
Flag 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>
ASP.NETHTML

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Lokesh B R

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Carl Tawn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Murray Brown

ASKER
Thanks very much
Murray Brown

ASKER
Thanks very much
Your help has saved me hundreds of hours of internet surfing.
fblack61