Horje

How to add HTML <textarea> required Attribute with label Tag

A form with a required text area.

Definition and Usage

The required attribute is a boolean attribute.

When present, it specifies that a text area is required/must be filled out (in order to submit the form).


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Syntax

<textarea required>

index.html
Example: HTML
<form action="/action_page.php">
<label for="text">Type</label><br>
<textarea rows="4" cols="50" name="comment" required>
</textarea>
<input type="submit">
</form>

Output should be:

How to add HTML <textarea> required Attribute with label Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin