Day 4
Day 4
1. `<div>` Tag:
- The `<div>` (division) tag is a block-level HTML element used to group and structure content
within a web page.
- It is often used to create containers for organizing and styling form elements or other content.
- `<div>` tags are typically styled using CSS to control layout and appearance.
2. `<label>` Tag:
- The `<label>` tag is used to provide a label or text description for a form element.
- It improves accessibility and user experience by associating labels with their corresponding form
controls.
- The `for` attribute in a `<label>` is used to link it to an `<input>` element via its `id`.
3. `<input>` Tag:
- The `<input>` tag is used to create various types of form input fields where users can enter data.
- It is a self-closing tag and requires attributes like `type` to specify the type of input.
4. `type="text"`:
- This is one of the types of `<input>` elements used for single-line text input fields.
5. `type="password"`:
- This input type is used for password fields, where the input characters are masked for security.
6. `type="email"`:
- The email input type is used for collecting email addresses and may include built-in validation to
ensure a valid email format.
7. `type="date"`:
- The date input type provides a date picker for selecting dates.
- It helps users input dates in a standardized format.
- `<option>` tags are used inside `<select>` to define individual options within the list.
9. `<button>` Tag:
10. `type="submit"`:
- It creates a button that, when clicked, submits the form's data to the server for processing.
11. `type="reset"`:
- It creates a button that, when clicked, resets the form's input fields to their default values.
- Radio buttons are used when users need to select only one option from a list.
- Unlike checkboxes, selecting one radio button deselects others in the same group.