HTML FORM Explained

HTML FORM Explained

Forms are essential components in HTML because they allow user input. This is how a form element looks <form action = “ “??method = “ “ ></form> Among the most common input types we can find are text, email, password, select, checkbox and radio. Clicking on a label that’s linked to an input will focus that input. Checkboxes and radio buttons can be grouped by using the same name attribute. The <textarea> element is used for large content, such as messages. In order to function properly, buttons should be placed inside the <form> element. Alternatively, you can use the form attribute on an external button to point to the correct form. Pressing a button that’s inside a form or is linked to that form will execute a submit action.?

  • Action is a path to the file that will receive the form information on submit.?
  • Method represents how the form information will be sent. You only have 2 options, Get or Post.?

No alt text provided for this image
No alt text provided for this image

  • Name attribute is used when sending the form information. Who ever receives it can identify the content of the Label field through this name, In our case right now is “login-email”
  • Id attribute should match with what ever you write in for the for = “” label. If you do that it will make it that if you click on the label it will be automatically focused.
  • Autofocus will autofocus that input automatically
  • Placeholder will place the text in the search box till you click on it

No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image

要查看或添加评论,请登录

Beniamin Martis的更多文章

社区洞察

其他会员也浏览了