Form HTML tags


Sure! Here are some commonly used HTML form tags:

1.<form>: Represents an HTML form element that contains other form elements.

Example:

<form action="/submit" method="POST">

  <!-- form elements go here -->

</form>

2.<input>: Represents an input control within a form. It can be used for various types of input, such as text, password, checkbox, radio buttons, etc.

Example:

<input type="text" name="username" placeholder="Enter your username">

<input type="password" name="password" placeholder="Enter your password">

<input type="checkbox" name="agree" id="agree">

<label for="agree">I agree to the terms and conditions</label>

3.<textarea>: Represents a multi-line plain text input control.

Example:

<textarea name="message" rows="4" cols="40" placeholder="Enter your message"></textarea>

4.<select>: Represents a drop-down list of options.

Example:

<select name="country">

  <option value="us">United States</option>

  <option value="ca">Canada</option>

  <option value="uk">United Kingdom</option>

</select>

5.<option>: Represents an option in a drop-down list (<select> element) or a list of suggestions (<datalist> element).

Example:

<option value="apple">Apple</option>

<option value="banana">Banana</option>

<option value="orange">Orange</option>

6.

<button>: Represents a clickable button.

Example:

<button type="submit">Submit</button>

<button type="reset">Reset</button>

<button type="button">Click me</button>

These are just a few examples of HTML form tags. There are more form-related tags and attributes available in HTML, depending on your specific requirements.

Comments

Popular Posts