name attribute is
used to reference
form data after it’s submitted, and
id attribute, which must be given a unique value
each time it’s applied to a new form control, a
name attribute with a given value may be applied to
numerous form controls (although in practice this approach is
only ever seen in use with radio
buttons). Note that only
form elements which have a
name attribute will have their values passed
through to the page or script specified in the
"favoritefood"provides a means for referencing the
<form> <label for="favoritefood">Favorite food</label> <select name="favoritefood" id="favoritefood"> <option>Cheese</option> <option>Egg</option> <option>Cabbage</option> ⋮ </select> </form>
This attribute takes as its value any name that the developer chooses, as long as that name doesn’t contain spaces or special characters.
It causes no compatibility issues, and has excellent support across all tested browsers.
There are no comments yet.