Html-text field

introduce

<textarea> Text area, you can enter multiple lines of text.

Attributes

Attributes translate illustrate
autofocus auto focus Automatically get focus when the page loads
disabled disabled disable text area
form form Specifies the form(s) to which it belongs
maxlength The maximum length Limit the maximum number of characters in the text field
name name text field name
placeholder Placeholder Input prompt, it will not be displayed after text input
readonly read only Specifies that the text is read-only
required need The text field must be written when the form is submitted
wrap new line How to wrap text when text reaches maximum value

the case

<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多行文本</title>

    <style>
        textarea {
            width: 600px;
            height: 300px;
            resize: none;
        }
    </style>
</head>

<body>

    <h1>多行文本输入框-文本域</h1>
    <div>
        <textarea name="" id="" cols="30" rows="10" placeholder="请输入您想说的话"></textarea>
    </div>

</body>

</html>
Run the final effect!

 

Guess you like

Origin blog.csdn.net/a451319296/article/details/128336938