The textarea tag is an HTML tag that we often use, mainly to achieve line breaks and other effects when entering longer text. Here is a quote from its basic usage:
textarea tag - represents a multi-line input field in an HTML form
textarea tags appear in pairs, starting with
Attributes:
Common -- General attributes
cols -- The number of columns of the multi-line input field
rows -- The number of rows of the multi-line input field
accesskey -- The form's Shortcut key access method
disabled -- the input field cannot gain focus, cannot be selected, is displayed in gray, and has no effect in the form
readonly -- the input field can be selected, but cannot be modified
tabindex -- Input fields, the traversal order using the "tab" key
The use case is as follows:
Html code:
on the label line can be copied to Test it locally.
The problem is, if the two
are not on the same line, for example
Writing code on separate lines will have different effects
You will find that: The first code is displayed left-aligned, while the next one will be displayed centered. So when using textarea, you must pay attention. The text in the textarea tag is relative to the textarea. The textarea is equivalent to providing an editing area. This area starts immediately after the textarea, which is the so-called WYSIWYG. As long as these two tags are not on the same line, the blank space before will also be recognized as blank text. You will find that your mouse editing pointer will not flash at the beginning of the text or next to the text. So use this label well and know where to start when you encounter problems.
It’s a bit confusing, you should be able to understand it after a little experimentation. Haha 0_*