Method: 1. Use the style attribute to add the "border:width style color" style to set the border color of the text box; 2. Use the style attribute to add the "background:color" style to set the background color; 3. Use style attribute, add the "color:color" style to set the text color.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
1. Set the border color of the text box
<input type="text" style="border:1px solid red;" value="测试文字" />
##2. Set the background color of the text box
<input type="text" style="max-width:90%" value="测试文字" />
3. Set the text color of the text box
<input type="text" style="max-width:90%" value="测试文字" />
html video tutorial》
The above is the detailed content of How to set the color of html text box. For more information, please follow other related articles on the PHP Chinese website!