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-attribute/ below:

HTML form Attribute - GeeksforGeeks

HTML form Attribute

Last Updated : 11 Jul, 2025

HTML form attributes define the behavior and properties of a form element. They include attributes like action for specifying where form data is sent, a method for the HTTP method used, and autocomplete for browser input suggestions, among others.

List of HTML form Attribute: Attribute Description Action Attribute Specifies where to send the form data upon submission. Target Defines where to display the response after submission. Method Determines the HTTP method used for submitting the form. Autocomplete Enables browser autofill suggestions for form fields. Novalidate Disables client-side form validation when present. Rel Specifies the relationship between the current and linked document. Accept-charset Defines the character encoding used for form submission. Enctype Specifies how form data should be encoded for submission.

Syntax: 

<element form="form_id"> 

Example: In this example the HTML form with attributes:

HTML
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" 
          content="width=device-width, initial-scale=1.0" />
    <title>HTml Form Attributes</title>
</head>

<body>
    <form action="/submit-form" 
          method="post" 
          target="_blank" 
          autocomplete="on" 
          novalidate rel="nofollow"
          accept-charset="UTF-8" 
          enctype="multipart/form-data">
        <label for="name">Name:</label><br />
        <input type="text" id="name" 
               name="name" 
               autocomplete="name" /><br /><br />

        <label for="email">Email:</label><br />
        <input type="email" id="email" 
               name="email" 
               autocomplete="email" /><br /><br />

        <label for="message">Message:</label><br />
        <textarea id="message" 
                  name="message"></textarea><br /><br />

        <input type="submit" 
               value="Submit" />
    </form>
</body>

</html>

Output:

HTML form Attribute Example Output


Supported Browsers: The browser supported by HTML form 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