On most websites generated by VisualStudio, the generated XTML is invalid. For instance:
Shows 54 errors :
Some tags, like "menu" or "ie:menu" are present in the generated XHTML file, which do not exist in the XHTML specifications.
Please advise me on how to build valid HTML websites with VisualStudio or other Microsoft products.
Thanks in advance.
I don’t think it is reasonable to hold Visual Studio responsible for what someone chooses to do with it. If you can show for example that the VS HTML or XHTML templates are invalid, then perhaps someone might take that seriously.
First, you are using a document type that was created in the late 1990′s. Things have changed a lot since then. This isn’t even a recent XHTML doctype. A number of these errors just have to do with where things are. example: an input element that isn’t in
a container like a <p>. That’s a design choice and nothing to do with VS. The bulk of the rest is for webparts. I rarely if ever see wwebparts used for anything outside an intranet environment where they help serve line of business applications. Correct some
of the placement issues for input elements, this is easily accomplished. Don’t use webparts if you don’t need to. Switch to a current HTML dtd. A number of these errors are not from VS generated code and are simple human error (missing quotes around attributes
Also, see if you can use bundling and minification. It will greatly enhance the performance of your page. There are a total of 41 requests being made with the page and I count a dozen scripts that could be bundled together and speed up the site (and improve
server performance avoiding extra requests).
For your issue,i suggest that you can try the link below about XHTML Standards in Visual Studio and ASP.NET :