Atribut formulir HTML <textarea>

tag HTML <textarea>

Contoh

Area teks yang terletak di luar formulir (tetapi masih merupakan bagian dari formulir):

<form action="/action_page.php" id="usrform">
  Name: <input type="text" name="usrname">
  <input type="submit">
</form>

<textarea name="comment" form="usrform">Enter text here...</textarea>

Definisi dan Penggunaan

Atribut formmenentukan bentuk milik area teks.

Nilai atribut ini harus sama dengan idatribut <form> elemen dalam dokumen yang sama.


Dukungan Peramban

Attribute
form Yes 11.0 Yes Yes Yes

Sintaksis

<textarea form="form_id">

Nilai Atribut

Value Description
form_id Specifies the form element the <textarea> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

tag HTML <textarea>