Mortgages - Personal Loans - Remortgages - Personal Loans - Debt Settlement

PDA

View Full Version : XHTML 1.0 Forms


Adam Hughes
Mar 5th 2008, 3:43 pm
I'm just finishing off a website, and I am doing my last page, the contact form. I am using Expression Web to create it. I am using XHTML Strict 1.0 as my language.

I am trying to create a form, simple enough, just asks for the persons email, first name, last name and a message.

However, Expression Web tells me off for using 'input' and 'textarea' tags. What am I supposed to use to be compliant with the guidelines? I've had a quick search around, but haven't found anything useful. Any ideas?

Thanks

Adam Hughes
Mar 5th 2008, 4:01 pm
Sorry, looks like I was just being blonde. Think the problem has been sorted by placing it into a paragraph tag.

Dan Schulz
Mar 5th 2008, 11:54 pm
Chances are you had your form input elements as direct descendants of the FORM element itself. Wrapping them inside a fieldset will take care of that problem, but IE doesn't style fieldsets very well.

http://www.tyssendesign.com.au/articles/legends-of-style/

Oh, and a P element is not the correct element to use as a wrapper - that's reserved for paragraphs of logical text arranged in sentences. :)

Adam Hughes
Mar 6th 2008, 8:39 am
Dan, thanks, I'll sort that out later on!

designh
Mar 6th 2008, 11:40 am
<fieldset>
<legend>User Information</legend>
<label for="name"><span>Name</span><input type="text" name="name" id="name" /></label>
<label for="email"><span>Email</span><input type="text" name="email" id="email" /></label>
</fieldset>

this is code to build form xhtml 1.0 strict compliant