Forms in HTML
Forms in HTML
DAY 5
TYPES OF ELEMENTS
INLINE ELEMENTS
BLOCK ELEMENTS
1.INLINE ELEMENTS
form is used to collect user input. The user input is most often sent to a server for
processing.
<form> element is used to create an HTML form for user input.
Eg: <form>
<!--form elements-->
</form>
FORM ELEMENTS
<label>: It defines label for <form> elements or to display the text as label.
<input>: It is used to get input data from the form in various types such as text,
password, email, etc by changing its type.
<button>: It defines a clickable button to control other elements or execute a
functionality.
<select>: It is used to create a drop-down list.
<textarea>: It is used to get input long text content.
<option>: It is used to define options in a drop-down list.
LABEL
An <input> element can be displayed in many ways, depending on the type attribute.
<input type="text"> Displays a single-line text input field
<input type="radio"> Displays a radio button (for selecting one of many choices)
<input type="checkbox"> Displays a checkbox (for selecting zero or more of many
choices)
<input type="submit"> Displays a submit button (for submitting the form)
<input type="button"> Displays a clickable button
SUBMIT BUTTON
-The <input type="submit"> defines a button for submitting the form data to a form-
handler.