Course Content
Ultimate HTML
The <textarea>
element is used to create a multi-line text input field on a web page. It is similar to the <input>
element, but allows users to input more than one line of text. The <textarea>
has an opening and closing tag, and any text placed between these tags will be the default value for the text area.
index.html
index.css
index.js
The <textarea>
element can have various attributes such as name
, rows
, cols
, placeholder
, maxlength
, and readonly
.
- The
name
attribute specifies the name of the text area, which is used to identify the field when the form is submitted. - The
rows
andcols
attributes determine the number of visible rows and columns of the text area. Specifies width and height of the text area. - The
placeholder
attribute specifies a short hint to the user about what kind of information is expected in the text area. - The
maxlength
attribute specifies the maximum number of characters that can be entered in the text area. - The
readonly
attribute, when added to the<textarea>
element, makes the field read-only, which means that the user cannot modify the text.
Which input type is used for selecting a date?
Select the correct answer
Which attribute is used to set the maximum number of characters allowed in a text input field?
Select the correct answer
Which element is used to create a multi-line input field?
Select the correct answer
Which attribute is used to set the initial value of an input field?
Select the correct answer
Section 5.
Chapter 6