Form Elements | HTML: Form elements are using to get the data from user based on type data type.
List of Form Elements:
- Input
- Select
- Text Area
- Button
- Fieldset and Legend
Input Types List:
- Phone
- Password
- Check Box
- File
- Date
- Reset
Input Attributes List:
- Value
- Read only
- Disabled
- Size
- Min, Max and Maxlength
- Auto focus
- Auto Complete
- Place Holder
- Height and Width
Form Attribute List:
- Form
- Form Action
- Form Method
- Form Target
- Form Novalidate
Here is formelements.html:
- <!DOCTYPE html>
- <html lang="en" dir="ltr">
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="css/stylesheet.css">
- <title>Form Elements</title>
- </head>
- <body>
- <form class="form" action="submit.html" method="post" id="form1">
- <fieldset>
- <legend>Personal Info : </legend>
- <label for="name">Name : </label><br>
- <input type="text" name="name" id="name"
- value="Nataraja Murthy" size="20" disabled readonly required><br><br>
- <label for="email">Email :</label><br>
- <input type="email" name="email" id="email" autofocus
- autocomplete="on" placeholder="abcde@gmail.com" required><br><br>
- <label for="phone">Phone Number :</label><br>
- <input type="tel" name="phone" id="phone"
- pattern="[0-9]{10}" maxlength="10" required><br><br>
- <label for="password">Password :</label><br>
- <input type="password" name="password" id="password" required><br><br>
- <label for="vehicle">Which vehicle you have ?</label>
- <input type="checkbox" name="bike" id="bike">
- <label for="bike">Bike</label>
- <input type="checkbox" name="car" id="car">
- <label for="car">Car</label><br><br>
- <label for="picupload">Choose your picture :</label><br><br>
- <input type="file" name="picupload" id="picupload"><br><br>
- <label for="birthdate">Date of Birth :</label>
- <input type="date" name="birthdate" id="birthdate"
- min="1990-01-01" max="2000-01-01"><br><br>
- <label for="gender">Choose your gender :</label><br><br>
- <input type="radio" name="gender" id="male">
- <label for="male">Male</label>
- <input type="radio" name="gender" id="female">
- <label for="female">Female</label>
- <input type="radio" name="gender" id="other">
- <label for="other">Other</label><br><br>
- <label for="fruits">Choose Fruits : </label>
- <select class="select" name="fruits" size="1" multiple>
- <option value="Mango">Mango</option>
- <option value="Banana">Banana</option>
- <option value="Apple">Apple</option>
- <option value="Orange" selected>Orange</option>
- </select><br><br>
- <label for="address">Address : </label><br>
- <textarea id="address" rows="5" cols="25"></textarea><br><br>
- <label for="feedback">Feedback : </label><br>
- <input list="feedback">
- <datalist id="feedback">
- <option value="excellent"></option>
- <option value="good"></option>
- <option value="poor"></option>
- </datalist><br><br>
- <input type="image" src="images/submit.png" alt="submit as User"
- formnovalidate formtarget="_self" id="submit" height="30" width="90">
- <input type="image" src="images/reset.png" alt="reset" id="reset" value="Reset">
- </fieldset>
- </form><br>
- <input type="image" src="images/submit2.png" alt="submit as Admin"
- formaction="submit2.html" form="form1">
- </body>
- </html>
Web view of Html:
Here is the Playlist: