"."/> ".">
Home > Article > Web Front-end > What is file in html5 form
In HTML5, file is the attribute value of the type attribute in the input element. The type attribute specifies the type of input element to be displayed. When the attribute value is set to "file", you can define the file selection field and "browse" Button for file upload, the syntax is "".
The operating environment of this tutorial: windows10 system, html5 version, Dell G3 computer.
file is the attribute value of the type attribute in the input element
Define the file selection field and "Browse.. ." button for file upload.
The type attribute specifies the type of element to be displayed.
The default type is: text.
Tip: This attribute is not required, but we think you should always use it.
The syntax is:
<input type="value">
The example is as follows:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <form action="demo-form.php"> 选择一个文件: <input type="file" name="img"> <input type="submit"> </form> </body> </html>
Output result:
(Learning video Share: css video tutorial)
The above is the detailed content of What is file in html5 form. For more information, please follow other related articles on the PHP Chinese website!