In HTML standards;
- 2 same
nameattributes can be used in differentformelements in the same html document. idattribute has to be uniqure in the same html document.label forrequiresidto work
So, the following is valid
<html>
<body>
<form id="form1">
<input name="abc">
</form>
<form id="form2">
<input name="abc">
</form>
</body>
</html>
However, the following is invalid if I use label for** because id is not unique**
<html>
<body>
<form id="form1">
<label for="item">Click me</label>
<input name="item" id="item">
</form>
<form id="form2">
<label for="item">Click me</label>
<input name="item" id="item">
</form>
</body>
</html>
So, do I use label for incorrectly or is this a bug related to label for in standards?
You are only supposed to have a unique id for every selector on a webpage. Why? For starters, the id field is so you can hyperlink to the exact section of a page. you can have multiple classes but only 1 id with a particular name.
I think what you are looking for is value="" http://www.w3schools.com/html/html_form_input_types.asp
http://www.w3schools.com/css/css_selectors.asp