ad

Friday, December 26, 2025

how to use textarea in HTML

how to use textarea in HTML

web designing theory

Syntax 

 Syntax of HTML <textarea> tag

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

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
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