2024-10-31
<input type="text">
For single-line text input.
Example:
<input type="password">
For secure password input.
Example:
<input type="email">
For email address input.
Example:
<input type="checkbox">
For selecting multiple options.
Example:
<input type="radio">
For selecting one option from a group.
Example:
<select>
For selecting an option from a dropdown list.
Example:
<textarea>
For multi-line text input.
Example:
<input type="submit">
For submitting the form data.
Example:
Define where and how the form data is sent.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Contact Form</title>
</head>
<body>
<h1>Contact Us</h1>
<form action="/submit" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name">
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="example@example.com">
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your password">
<label for="message">Message:</label>
<textarea id="message" name="message" placeholder="Enter your message here" rows="4" cols="50"></textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>
E. Bruno