A RetroSearch Logo

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

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-input-formenctype-attribute/ below:

HTML | <input> formenctype Attribute

HTML | <input> formenctype Attribute

Last Updated : 12 Aug, 2022

The HTML <input> formenctype Attribute is used to specify how to form-data encoded when submitting the form into the server. This attribute works with method="post". This attribute overrides the enctype attribute of the <form> element. 

Syntax:

<input formenctype="value">

Attribute Values:

Example: 

html
<!DOCTYPE html>
<html>

<head>
    <title>HTML input formenctype Attribute</title>
</head>

<body style="text-align: center">

    <h1 style="color: green">GeeksforGeeks</h1>

    <h4>HTML &lt;input&gt; formenctype Attribute</h4>

    <form action="#" method="post">

        First name:
        <input type="text" name="fname"> Last name:
        <input type="text" name="lname">
        <br>
        <br>

        <input type="submit" value="Submit" 
               formenctype="multipart/form-data">
    </form>
</body>

</html>

Output:

  

Supported Browsers: The browsers supported by HTML input formenctype 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