Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

The <textarea> Element

The <textarea> element establishes a multi-line input field, known as a text area:

Example

<textarea name=”message” rows=”10″ cols=”30″>
The cat was playing in the garden.
</textarea>

The rows attribute determines the visible number of lines in a text area, while the cols attribute specifies its visible width.

Here’s how the HTML code above will appear when rendered in a browser:

You can also specify the size of the text area using CSS:

Example

<textarea name=”message” style=”width:200px; height:600px;”>
The cat was playing in the garden.
</textarea>

The <button> Element

The <button> element specifies a button that can be clicked.

Example

<button type=”button” onclick=”alert(‘Hello World!’)”>Click Me!</button>
Reminder: Ensure to define the type attribute for the button element at all times. Various browsers might employ distinct default types for the button element.