0% found this document useful (0 votes)
12 views2 pages

Day 4

The document provides an overview of various HTML tags used in web forms, including `<div>`, `<label>`, `<input>`, `<select>`, and `<button>`. It explains the purpose and usage of different input types such as text, password, email, date, checkboxes, and radio buttons. Each tag and input type is described in terms of functionality and how they enhance user experience and accessibility in web forms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Day 4

The document provides an overview of various HTML tags used in web forms, including `<div>`, `<label>`, `<input>`, `<select>`, and `<button>`. It explains the purpose and usage of different input types such as text, password, email, date, checkboxes, and radio buttons. Each tag and input type is described in terms of functionality and how they enhance user experience and accessibility in web forms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

- Users can enter alphanumeric characters in a text input.

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.

8. `<select>` and `<option>` Tags:

- The `<select>` tag creates a drop-down menu or select list.

- `<option>` tags are used inside `<select>` to define individual options within the list.

- Users can choose from the available options.

9. `<button>` Tag:

- The `<button>` tag is used to create clickable buttons within a form.

- It can be used for custom actions, such as triggering JavaScript functions.

10. `type="submit"`:

- This is a type attribute for the `<button>` or `<input>` element.

- It creates a button that, when clicked, submits the form's data to the server for processing.

11. `type="reset"`:

- Another type attribute for the `<button>` or `<input>` element.

- It creates a button that, when clicked, resets the form's input fields to their default values.

12. Checkbox (`<input type="checkbox">`):

- Checkboxes allow users to select multiple options from a list of choices.

- Each checkbox is independent, and multiple checkboxes can be selected simultaneously.

13. Radio Button (`<input type="radio">`):

- 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.

You might also like