The text size and text color of the HTML textarea text input field can be modified. Following the previous article " The border style and color of the HTML textarea text input field ", this article will tell you how to use the font- of css size and color attributes to modify textarea text size and color inside, so that the whole textarea better rendering in a web form, in order to explain more clearly, it will also provide several examples to give you a reference, but also sample content Related reference topics will be provided. The difference between
the text size of the text input field in HTML textarea and the text color examples ineach example lies in the setting of the two css properties, font-size and color.Example 1: Blue text with a size of 13px<textarea style="font-size:13px;color:blue;" >
Blue text with a size of 13px
</textarea>
Present resultsThe key point is the style style (blue label area) used in the label of the textarea at the beginning, font-size:13px is to display text with a size of 13px, and color:blue is to display the blue text color. Both of these css properties It is an attribute with a very high usage rate. It is recommended to take some time to study the following two articles.- css standard method of modifying text size: CSS font-size text size .
- The standard method of css to modify the text color: CSS color text color .
If you are familiar with the above two articles, you can continue to look at the following examples, and even write good works by yourself.Example 2: Green text with a size of 15px<textarea style="font-size:15px;color:green;" >
Green text with a size of 15px
</textarea>
Present resultsThe second example is to increase the font-size of the first example from the original 13px to 15px, and at the same time the color is changed from the original blue (blue) to green (green). After reading the two detailed introductions provided by the example 1, you should The second example is very understanding.Example 3: Red text with a size of 20px<textarea style="font-size:20px;color:red;" >
Red text with a size of 20px
</textarea>
Present resultsExample 3 continues Example 2. The text in the textarea is expanded to 20px again, and the text color is changed to red (red). The basic concept is the same as the above two examples. Here is another color code query page. You can easily modify more different text colors.- Hexadecimal color codes for hundreds of colors: color code table .
Seeing here, we should have a certain understanding of the text size and color modification in the textarea text input field, and then we plan to modify the text style, that is, the text font, to make the text in the textarea more beautiful, which will use css For font-family skills, please read this article: Use css font-family to modify the text font in the textarea.
Post a Comment
0 Comments