HTML textarea text input field background color

 The default value of the background color of the HTML textarea text input field is actually no color. In other words, if the background color of the web page is white, the background color of the textarea will look white. If the background color of the web page is other colors, the textarea The background color of the textarea is also changed. Since this is the default effect, of course, there is room for designers to modify. You can modify the background color of the textarea text field through the background-color property of css . Almost all mainstream browsers do support. Several examples of modifying HTML textarea text fields, using css background-color


<textarea style="background-color:#FFF0D4;">This is the #FFF0D4 background color</textarea>
<textarea style="background-color:#C9FFC9;">This is the #FFF0D4 background color</textarea>
<textarea style="background-color:#C9FFFF;">This is the #FFF0D4 background color</textarea>
Present results
  
The background color used in the above background-color is taken from: color code table .

Three examples are prepared here. The only difference is that the color code of the color is different, and the background color presented is of course different. The focus is on the textarea tag at the beginning. The style is used to declare the CSS style to modify the textarea . Then The background-color attribute is used in style to complete the final result. This is the standard practice of CSS. If you don’t know the basic syntax of text fields or the background color attribute of CSS, you can refer to these two articles first.
  • HTML textarea text field
  • CSS background-color background color
Changing the background color is one of the simpler ways to beautify the textarea . The designer can easily match the background color of the textarea according to the color or style of the webpage . If you want to further improve the texture, you can also directly modify the textarea . Background picture, refer to this article: HTML textarea text input field background picture .

Post a Comment

0 Comments