A RetroSearch Logo

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

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-textarea-name-attribute/ below:

HTML <textarea> name Attribute - GeeksforGeeks

HTML <textarea> name Attribute

Last Updated : 18 Dec, 2024

The name attribute for the <textarea> element is essential for several reasons:

Syntax:

<textarea name="text">

Attribute Values: It contains the value i.e name which specifies the name for the <Textarea> element. 

Example:

Here's a simple HTML code example that demonstrates the use of the name attribute in a <textarea> element.

HTML
<!DOCTYPE html>
<html>
<head>
    <title>Textarea Name Attribute Example</title>
</head>
<body>
    <h3>Textarea Example</h3>
    <p>Please enter your comments:</p>
    <textarea name="userComments" rows="4" cols="50">
     Enter your text here...
    </textarea>
    <br>    
</body>
</html>

Output:

In this example:

Best Practices for Using the name Attribute Supported Browsers

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