|
HTML Home
Create a Website HTML TutorialHTML Tutorial HomeAbout HTML Getting Started HTML Elements HTML Formatting HTML Attributes HTML Colors HTML Links HTML Images HTML Meta Tags HTML Comments HTML Forms HTML Tables HTML Image Maps HTML Frames HTML Entities HTML Layouts HTML Styles HTML Scripts HTML Website Templates Website Hosting Summary HTML Code GeneratorsHTML Code GeneratorHTML Table Generator Marquee Generator Music Code Generator HTML Text Generator Text Box Generator Free HTML CodesHTML Background CodeHTML Comment Box Codes HTML Scroll Box Codes HTML Font Codes HTML Picture Codes HTML Marquee Code HTML Music Codes HTML Templates More Codes... HTML ReferenceHTML ExamplesComplete HTML Tag List Complete HTML 5 Tag List HTML Special Characters Hex Color Codes HTML Help FREE Hosting!With every domain name you register with ZappyHost, you get FREE hosting.$1.99 Domain NamesWith every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99. |
HTML Code for ColorsHTML 4.01 transitional allows you to use the color attribute to specify colors for text and the bgcolor attributes to specify background colors for the document body and table cells. Using HTML code for colors is now deprecated - colors should be specified via Cascading Style Sheets (CSS). CSS provides the color property and the background-color properties, both of which can be applied to any HTML element. And there's the border-color and outline-color properties for borders and outlines. You can also specify color for borders with the border property (which allows you to set all border properties in one go), and likewise for outlines with the outline property. Colors can be defined using either its color name, its hexadecimal value, or its rgb value. Examples of Setting Color using Inline Styles:
This code results in: HTML code for colors or CSS code for colors that's the question... If you don't want to specify the color everytime an element appears, you can declare it in the document head or, even better, in an external stylesheet. You can also check out the hex color codes page to learn about colors in HTML and CSS. Enjoy this website?
Oh, and thank you for supporting Quackit! |
Need Content for your Website?Get unique, quality digital content for your website. You can even earn money by reselling it!Includes:
|