![css color codes for white css color codes for white](https://creativepro.com/wp-content/uploads/2015/09/CSS-code-mixed-color-models.jpg)
Please Note: Although the colour names above are supported by most major browsers, not all of them are actually valid HTML or CSS, as specified by W3C. You can sort the table by colour name or by hex code. Here is what it will look like in a web browser: 123 Main Street Los Angeles, CA ph: 21Īfter you have added these tags, be sure to save your file then preview it in a web browser.Both HTML colour codes (hexadecimal values) and their CSS colour names are shown in the chart below.
CSS COLOR CODES FOR WHITE CODE
Since this page is for a library, I'm going to add the street address and phone number and I want it to be dark green (hex code is #006633): Let's add some contact information to the page.Open the index.html file in Notepad (if it isn't already open!).
![css color codes for white css color codes for white](https://freefrontend.com/assets/img/css-color-palettes/gradient-collection.png)
Now let's add some font colors to the index.html page. If you use the FONT tag to assign colors, those colors will override any colors you assigned in the BODY tag. Which looks like this in a web browser: T E C H N I C O L O R You could even make each letter in a word a distinct color: T Which looks like this in a web browser (notice that I reduced the size of the font, and changed the face to a typewriter-like font face called Courier): TECHNICOLOR Here is an example of the FONT attributes color, size, and face in action: TECHNICOLOR You should stick with these font faces for now. Arial is a safe font face to use, and is very readable which makes it very popular. The face attribute is trickier you should only use font faces that everybody has on their computers. You notice that adding the size="5" attribute with value 5 made the text larger? Font sizes range from 1 to 6: is large is tiny Which looks like this in a web browser: TECHNICOLOR But if I add a FONT tag to it, and add the attributes color (use bgcolor only in the BODY tag) and size I can change the look of the word: TECHNICOLOR If I do nothing to it, it is just plain black text, size 3. Here's an example from Webmonkey (an excellent HTML tutorial website from Wired magazine). Your browser uses some default font settings: the default face is usually Times and the default size is 3, and the default color is black.īut the FONT tag allows you to override those defaults, and display text in special ways. You know font faces by name: Arial, Courier, Times. Introduction to FontsĪll text on a web page is in a font. What if you wanted control over the colors of specific pieces of text on your page? For that you need to learn about the FONT tag. Not too tough, huh? But these BODY attributes affect all the text on a web page. Save the file in Notepad then preview it with a web browser.Experiment by mixing the HEX values below: ff6347. To display white, set all values to ff, like this: ffffff. To display black, set all values to 00, like this: 000000. Replace the opening tag with this tag: For example, ff0000 is displayed as red, because red is set to its highest value (ff) and the others are set to the lowest value (00).Let's go ahead and add attributes to the BODY tag of our index.html file. The background for the page will be white (the bgcolor attribute, "#ffffff" is the hex code for white), the text (the text value, "#000000", is the hex code for black) will be black, links (the link attribute) will be blue, and visited links (the vlink attribute) will be red. If I add these attributes to the BODY tag, it will look like this: The vlink attribute affects the color of links that have been visited on a web page (the default color for visited links is purple). The link attribute affects the color of the linked text on a page (the default color for links is blue). The text attribute affects the color of regular text (text that is not linked) on a page. There are more attributes we can put in the BODY tag that will affect the color of text and links on a web page.
![css color codes for white css color codes for white](http://webtechtips.net/wp-content/uploads/2015/05/HTML-Blue-Color-Code.jpg)
Always preview your choices in a web browser! You don't want to overwhelm people with your color choices, so bright yellow is probably not a good background color. This is a good time to put in a word about color choices. "#ffffff" is the code for white, and you need to always use the "#" and enclose the hex code in quotations (it's a value of an attribute, remember). Click here to see some of the possibilities. There are literally hundreds of possible hex codes you can apply to a background. Here is what it looks like in the BODY tag: Here is what the attribute looks like: bgcolor="#ffffff" To change the background color, you need to add an attribute and a color value to the opening BODY tag (you never add an attribute to a closing tag!).