Failing HTML Validation

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Hello all,

I have written a site that I am trying to validate at http://validator.w3.org/,
However, I have a number of failues as .net is putting in trailing
slashes. For example, in my code I have

<meta http-equiv="Page-Exit"
content="progid:DXImageTransform.Microsoft.Fade(duration=.5)" >

but when it renders it comes out like

<meta http-equiv="Page-Exit"
content="progid:DXImageTransform.Microsoft.Fade(duration=.5)" />

This causes the page to fail. Can anyone please help as I want to get
rid of the trailing slashes.

The site in question is; http://www.nantwichonline.com on the
homepage.

Regards,

Jon Yates
http://www.nantwichonline.com
 
The markup that VS is generating is fine, it's your DOCTYPE that's
incorrect. Your DOCTYPE indicates you are writing HTML 4.01 Transitional,
where the trailing slash is illegal, but VS generates XHTML 1.0 (and places
that DOCTYPE into the code), where the trailing slash is required on tags
that don't normally get closed.

You can either leave VS's generated DOCTYPE tag alone (not change it to HTML
4.01) or you can manually change your code to be compliant with HTML 4.01.
I'd suggest you simply let VS generate the XHTML as it does by default.

-Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XHTML and Framesets 1
How To Stop Caching By ISP Proxy Servers 3
Turn off Caching 4
I cant find my meta tag 2
meta tag 1
Creating custom form in Asp.NET 2.0 3
META REFRESH 2
Total Beginner Question 7

Back
Top