Situatie
What is HTML Form :
HTML Form is a document which stores information of a user on a web server using interactive controls. An HTML form contains different kind of information such as username, password, contact number, email id etc.
The elements used in an HTML form are check box, input box, radio buttons, submit buttons etc. Using these elements the information of an user is submitted on a web server.
The form tag is used to create an HTML form.
Solutie
Pasi de urmat
Example of an HTML Form :
<!DOCTYPE html> < html > < body > < form > Username:< br > < input type = "text" name = "username" > < br > Email id:< br > < input type = "text" name = "email_id" > < br >< br > < input type = "submit" value = "Submit" > </ form > </ body > </ html > |
Input Element in HTML Forms :
Input Elements are the most common elements which are used in HTML Forms. Various user input fields can be created such as textfield, check box, password field, radio button, submit button etc. The most common input elements are listed below:
Text Field in HTML Forms :
The text field is a one line input field allowing the user to input text. Text Field input controls are created using the “input” element with a type attribute having value as “text”.
<!DOCTYPE html> < html > < h3 >Example Of Text Field</ h3 > < body > < form > < label for = "EMAIL ID" >Email Id:</ label >< br > < input type = "text" name = "Email id" id = "Email id" > </ form > </ body > </ html > |
Password Field in HTML Forms :
Password fields are a type of text field in which the text entered is masked using asterisk or dots for prevention of user identity from another person who is looking onto the screen. Password Field input controls are created using the “input” element with a type attribute having value as “password”.
<!DOCTYPE html> < html > < h3 >Example of Password Field</ h3 > < body > < form > < label for = "user-password" >Password: </ label >< br > < input type = "password" name = "user-pwd" id = "user-password" > </ form > </ body > </ html > |
Leave A Comment?