HTML Tutorial: Forms

<textarea> ... </textarea>


<form name="tarea" style="width:fit-content; margin:auto">
    <textarea id="tarea" name="input" rows="6" cols="50">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
    nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
    non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </textarea><br>
 <input type="submit">       
</form>

Textarea is used to input multi-line plain-text, useful for collecting user inputs such as comments, reviews, website file managers or any form of text entry. It is useful for entering a large amount of text where a single-line input field would be insufficient. The name attribute is required. The attributes cols and rows or CSS define its size. Other attributes include autofocus, disabled, form, maxlength, placeholder, readonly, required, and wrap.

<input type="hidden">

<input type="hidden"> is an form element that is not visible to the user used to submit required data that the user doesn't need to see. The name and value attributes are required. The example below takes feedback from this page and displays the feedback and source of the feedback but the source is hidden from the user.


Reset
<form name="feedback" style="margin-left:2em" 
 action="feedback.php" target="feedback.php">
<textarea name="feedback" cols="30" rows="5"></textarea>
<input type="hidden" name="origin" value="04.php"><br>
<input type="submit" value="Submit Feedback"> 
<a href="04.php">Reset</a>
</form>