Failing HTML Validation

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
 
S

Scott M.

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top