What are these HTML form fields for? -
I saw some code, HTML form code that looks like this:
; Form name = "form1" method = "post" action = "action.fp" & gt; & Lt; Label = "name" & gt; Name: & lt; Input type = "text" name = "name" & gt; & Lt; Label = "email" & gt; Email: & lt; Input type = "article" name = "email" & gt; & Lt; / Form & gt;
What kind of "names" are there? (-> Form 1)
What are the label tags for? (I have never used it, therefore, I may be wrong when entering the code)
label The pieces of text are next to the input field - they do not appear to be different from the general text, but:
- Clicking on them puts focus on the field
- Read the details of related fields.
These can also be useful for CSS - using labels, you can easily separate your field labels from other page elements.
Form name
attribute makes it easy to render the form with JavaScript (although these days you use id
for it).
Comments
Post a Comment