course content

Course Content

Ultimate HTML

Textarea ElementTextarea Element

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.

html

index.html

css

index.css

js

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 and cols 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.
1. Which input type is used for selecting a date?
2. Which attribute is used to set the maximum number of characters allowed in a text input field?
3. Which element is used to create a multi-line input field?
4. Which attribute is used to set the initial value of an input field?

question-icon

Which input type is used for selecting a date?

Select the correct answer

question-icon

Which attribute is used to set the maximum number of characters allowed in a text input field?

Select the correct answer

question-icon

Which element is used to create a multi-line input field?

Select the correct answer

question-icon

Which attribute is used to set the initial value of an input field?

Select the correct answer

Section 5.

Chapter 6