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
 
Back
Top