PDA

View Full Version : The best way to make a valid web form in XHTML?



sirantonycartwr
16 Aug 2007, 05:58 AM
The best way to make a valid web form in XHTML?

How do you think i should do it?

I would normally use ASP but my host wont let me upload them so im going to use a different technique.

<input name="lname" type="text" id="lname" /></p>

The input tag above isnt valid in XHTML strict.

Please help, Ant...

Wickham
16 Aug 2007, 06:56 AM
I agree that XHTML requires id instead of name but there are a few instances where id doesn't work, so name has to be used.

However, I've just checked a page of mine that has a form using name=".." and it does validate with Doctype XHTML 1.0 Strict.

http://www.wickham43.net/forms.php

I wouldn't worry about it so long as it works. If your page doesn't validate, it probably will if you use a transitional Doctype.