how to use textarea in HTML

how to use textarea in HTML

web designing theory

This Blog You Will Learn 

ஃ What is the <textarea> in HTML?

ஃ When Should you use <textarea> tag ?

 Syntax of HTML <textarea> tag

ஃ Summary 

ஃ Explain Program

ஃ Output

What is the <textarea> in HTML?
  1.  HTML forms use sometime  a simple single-line text box is not enough .
  2.  user to enter long text type feedback  ,description    this time use <textarea>html tag use.
  3. HTML <textarea> tag use < input> field accept one line text.or multiple text accept.
  4. HTML <textarea> tag use creates multiple line text input box in web form.
  5.  <textarea> tag use  capture longer pieces of text for user.
  6.  example :- message,feedback,story, comment.

 When Should you use <textarea> tag ?

✅HTML <textarea> tag collect large or multiple-line text .
✅Long description
✅user stories 
✅essays
✅comments or reviews
✅Feedback messages

 Syntax of HTML <textarea> tag

<textarea>.......</textarea>

  • HTML <textarea> tag must use both opening and closing tag

Summary 

  • HTML <textarea> tag use multiple line text your web forms.
  • with customizable attributes  use
                cols and rows(size)
                 maxlenght  (char limit)
                 placeholder(hint text)
                readonly (read-only text)
                required (must be filled )
  • HTML <textarea> tag  user -friendly and functional. 

how to use textarea in HTML

Example 

<!DOCTYPE html>
<html>
    <head>
        <title>HTML textarea tag</title>
    </head>
    <body>
        <h1>  HTML textarea tag</h1>
        <textarea  rows="4" cols="50">
At webdesigningtheory.blogspot.com
you will learn programming language how to
make a website.They offer free tutorials in
all web development technologies learn visit
us.        </textarea>
       
    </body>
</html>

how to use textarea in HTML
Explain Program

Step  1] 

<!DOCTYPE html>

  • This declare the document type.
  • browser that the document is written in html

Step 2 ]

<html>.... . </html>

  • html is the root element of the html page.
  •  Every thing inside it is part of the webpage.

Step 3]

<head>
     
  <title> HTML textarea tag </title>
    </head>

  •   <head>  section 
  •   head section contains metadata about page. not visible on the page itself.
  •  <title> tag  title section set the title of the page shows the browser tab. 

    Step 4]

<body>
<h1>  HTML textarea tag</h1>

<textarea  rows="4" cols="50">
At webdesigningtheory.blogspot.com you will
learn programming language how to make
a website.They offer free tutorials in
all web development technologies learn
visit us.
        </textarea>
       
</body>

  • <body> body contains the visible content webpage.
  • html <h1> tag  heading.  
  • html <textarea> tag  to create a multi-line text input field.
  • <textarea> default text appears inside the textarea page loads.
  • rows :-  number of visible lines in the textarea.
  • cols  :-  width of textarea character columns

Step 5]

  Closing tag  

 
</textarea>       
    </body>
</html>

how to use textarea in HTML

Output







Related Post :-

how to use the html button input

how to create ordered lists in html

html alignment tag

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026