A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-form-enctype-attribute/ below:

HTML | <form> enctype Attribute

HTML | <form> enctype Attribute

Last Updated : 22 Jul, 2022

The HTML <form> enctype Attribute is used to specify that data that will be present in form should be encoded when submitting to the server. This type of attribute can be used only if method = “POST”

Syntax:

<form enctype="value"> 

Attribute Value: This attribute contains three value which are listed below:

Example: This Example illustrates the use of enctype attribute in <form> element. 

html
<!DOCTYPE html>
<html>

<head>
    <title>Form enctype attribute</title>
</head>

<body style="text-align: center">
    <h1 style="color: green">GeeksforGeeks</h1>
    <h2>Form enctype Attribute</h2>
    <form action="#"
          method="post" 
          enctype="multipart/form-data">
        First name:
        <input type="text" 
               name="fname">
        <br> Last name:
        <input type="text"
               name="lname">
        <br> Address:
        <input type="text" 
               name="Address">
        <br>
        <input type="submit"
               value="Submit">
    </form>
</body>

</html>

Output :

  

Supported Browsers: The browsers supported by <form> enctype Attribute are listed below:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4