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.Replace the opening tag with this tag:.Let's go ahead and add attributes to the BODY tag of our index.html file.
CSS COLOR CODES EFFECTS CODE
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. 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" These colors are safe because they run correctly 256 color palette.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!). These are of 216 variety of colors ranges from 00000 to FFFFF. List of the web browser which is safe and independent colors. Verify the HTML Color code Builder for that you need java to enable browser. You can create the number of color codes using Color Code Builder. Here some examples of colors using RGB values. NOTE − All the browsers may not support rgb() property so it is not recommended use. This value can be an integer between 0 and 255 or a percentage(%). This property contains three values which are red, green, and blue. In this, the color value is specified with the help of rgb( ) property. Some color short form is described below.
Every hexadecimal code is represented by the pound or hash sign(#). Hexadecimal codes can be described in the shortest form. Every hexadecimal code is represented by a hash sign(#) or pound.
CSS COLOR CODES EFFECTS SOFTWARE
These hexadecimal values can be derived from any graphics software like Jasc Paintshop Pro, Adobe Photoshop and also advanced paintbrush. The Red color specified by the first two digits value which is “RR”, the green color occupies its place as the next two-digit value which is “GG” and remaining are blue color whose value is “BB”. The Hexadecimal is a six-digit representation of the color.