Welcome to WebmasterWorld Guest from 54.158.253.134

Forum Moderators: incrediBILL

Message Too Old, No Replies

<legend> required in very simple form

page doesnt need it

     
11:48 am on Mar 7, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 13, 2003
posts:1240
votes: 0


I have a very simple form consisting of

<label><select><button></label>

I dont need a <legend> - the label makes it clear what its for, but i want to validate in html4 strict.

Any thoughts?

1:13 pm on Mar 7, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


The <legend> is only required where you have a <fieldset>. It provides the caption for the <fieldset>. If you are not grouping multiple elements together with the <fieldset> (ie. just using it for the border effect around a single element) then consider using a <div> container instead?
1:25 pm on Mar 7, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 13, 2003
posts:1240
votes: 0


dont need the fieldset at all, but had been doing so many big forms that when i came to mark this up i automatically structured it the same. thanks!