HTML CSS examples for HTML Tag:input
The value attribute specifies the value of an <input> element.
The value attribute is used differently for different input types:
The value attribute cannot be used with <input type="file">.
Value | Description |
---|---|
text | Specifies the value of the <input> element |
An HTML form with initial (default) values:
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> First name: <input type="text" name="fname" value="John"><br> Last name: <input type="text" name="lname" value="Doe"><br> <input type="submit" value="Submit form"> </form><!--from w ww.ja v a 2s . c o m--> </body> </html>