Skip to content
Related Articles

Related Articles

Improve Article

HTML | <textarea> form Attribute

  • Last Updated : 06 May, 2021

The HTML <textarea> form Attribute is used to specify the one or more forms that the <Textarea> element belongs to.
Syntax: 
 

<Textarea form="form_id"> 

Attribute Values: 
 

  • form_id: It Contains the value i.e form_id which specify the one or more  form that the Textarea element belongs to. The value of this attribute should be id of the <form> element.

Example: 
 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>Textarea Form Attribute</title>
    <style>
    }
    fieldset {
        width: 50%;
        margin-left: 22%;
    }
    h1 {
        color: green;
    }
    </style>
</head>
 
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <h2><textarea> form Attribute</h2>
        <textarea form="mygeeks" cols="20" ;>
            GeeksForGeeks. A computer science portal for Geeks
        </textarea>
        <br>
        <form id="mygeeks">
            Name:
            <input type="text" name="usrname">
            <input type="submit">
        </form>
    </center>
</body>
 
</html>

Output: 
 



Supported Browsers: The browser supported by HTML <Textarea>form Attribute are listed below: 
 

  • Google Chrome
  • Internet Explorer 10.0 +
  • Firefox
  • Opera
  • Safari

 

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :