• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • Last Modified:

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


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">  
    <meta charset="utf-8">    
    <title>My Title</title>  
    <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>

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

Murray Brown
Murray Brown
  • 2
2 Solutions
Lokesh B RDeveloperCommented:

You need this update - Web Standards Update for Visual Studio 2010 SP1

Check the below links for HTML5 elements support on VS 2010


Carl TawnSystems and Integration DeveloperCommented:
The nav element is valid, but it still needs to live inside the body element, rather than outside it like you currently have it.
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now