Results 1 to 25 of 137
Jul 4, 2003, 08:46 #1
- Join Date
- Mar 2002
- 0 Post(s)
- 0 Thread(s)
Useful HTML elements that 90% of all developers are unaware of
This week I "discovered" the <fieldset> element, which has been around for several years, but was completely unknown to me - until now (thank you beetle ! )
I really like this way of creating something similar to a GroupBox/Frame control in a WinForms application (<legend> == Text/Caption)
Think I will use it very extensively to group related fields in the future
Another element, that I knew existed, and also have used a lot in my forms is the <label> element
However, I've noticed that using <label>s next to form elements is unusual, I guess it can't hurt to talk about that one too
In fact, why not encourage you all to resurrect "unknown" elements, attributes etc that you believe are useful but rarely used by the majority?
Finally, a little example, how to use <fieldset> and <label>
... <form action=""> <fieldset> <legend>My favourite thing is...</legend> <input type="radio" id="optFav0" name="optFav"> <label for="optFav0">Raindrops on roses</label><br> <input type="radio" id="optFav1" name="optFav"> <label for="optFav1">Whiskers on kittens</label><br> <input type="radio" id="optFav2" name="optFav"> <label for="optFav2">Bright copper kettles</label> </fieldset> <p><input type="submit"></p> </form> ...