I am confused why Visual Studio 2010 gives me the following validation error in my original tag.
Validation (HTML5): The element 'source' cannot be nested in the element 'Audio'
Below is my code in cshtml View:
@{ ViewBag.Title = "Audio"; string audioURL = Url.Content("~/Content/Audio/untitled.mp3"); } <div> <audio id ="myAudio" controls preload="auto"> <source src="@audioURL" type="audio/mpeg" /> </audio> </div>
I look around and I have seen many references to several src attributes in the tag. But this does not answer my question, why is there a validation error? This is really correct, but VS2010 considers it wrong, or is it really wrong, and if so, why is it wrong?
source share