HTML color directive

In the design of HTML web pages, various color commands are always needed, such as web page background color, text color, web element color, element border color, and other color requirements. Different web page elements need to use different color commands. Specify the color, such as setting the color of the entire web page, which can be directly specified in the body tag. Please refer to the following common color instruction table. It is recommended to refer to the CSS alternatives in the table. HTML5 can get better support. In addition, you can "Color code table" found many nice colors.


HTML common color instruction list
Color instructionsInstructionsCSS alternative
bgcolor
Web page background colorbackground-color
text
Text colorCSS color text color
linkHyperlink colorModify the hyperlink color
vlinkLink color already seenModify the hyperlink color
alinkThe color of the mouse cursor linkModify the hyperlink color

Examples of using color commands in the body tag
<body bgcolor="blue" text="black" link="orange">
The example is to write various color commands directly in the body tag, where "bgcolor="blue"" represents the background color is blue, "text="black"" represents the text color is black, and "link="orange"" The representative link is orange. This method of writing all HTML color instructions directly in the body tag is the standard practice of early web design, but with the popularization of CSS technology, these color instructions can find alternatives in CSS , Please refer to the alternatives in the common command list to design, the new browser support will be better.

Post a Comment

0 Comments