Skip to main content

Learn CSS tricks for beginner : Colours

The following values, to specify full-on as red-as-red-can-be, all produce the same result:
  • red
  • rgb(255,0,0)
  • rgb(100%,0%,0%)
  • #ff0000
  • #f00
Predefined color names include aquablackbluefuchsiagraygreenlimemaroonnavyoliveorangepurple,redsilvertealwhite, and yellowtransparent is also a valid value.








The three values in the RGB value are from 0 to 255, 0 being the lowest level (no red, for example), 255 being the highest level (full red, for example). These values can also be a percentage.
Hexadecimal (previously and more accurately known as “sexadecimal”) is a base-16 number system. We are generally used to the decimal number system (base-10, from 0 to 9), but hexadecimal has 16 digits, from 0 to f.
The hex number is prefixed with a hash character (#) and can be three or six digits in length. Basically, the three-digit version is a compressed version of the six-digit (#ff0000 becomes #f00#cc9966 becomes #c96, etc.). The three-digit version is easier to decipher (the first digit, like the first value in RGB, is red, the second green and the third blue) but the six-digit version gives you more control over the exact color.








color and background-color

Colors can be applied by using color and background-color (note that this must be the American English “color” and not “colour”).
A blue background and yellow text could look like this:

h1 {
    color: yellow;
    background-color: blue;
}
These colors might be a little too harsh, so you could change the code of your CSS file for slightly different shades:
body {
    font-size: 14px;
    color: navy;
}
h1 {
    color: #ffc;
    background-color: #009;
}
Save the CSS file and refresh your browser. You will see the colors of the first heading (the h1 element) have changed to yellow and blue.
You can apply the color and background-color properties to most HTML elements, including body, which will change the colors of the page and everything in it.

Popular posts from this blog

Free tips to save yourself from phishing

Free tips to save yourself from phishing Phishing is a type of social building method utilized by programmers to assemble delicate data, for example, usernames, passwords and Visa points of interest by acting like a trustworty individual/association. Since most online clients are ignorant of the methods utilized as a part of completing a phishing assault, they regularly fall exploited people

Free internet browser download :internet explorer

Internet explorer full free downloads Internet explorer 11.0.11 full free download Internet explorer 10.0 full free download Internet explorer 9.0 full free download internet ex plorer lastest version download these are the lastest version of internet explorer...if you want anything else then let me by sending me comment i will try my best to give that...............

tricks to Hack an Email using Hardware Keylogger

tricks to Hack an Email using Hardware Keylogger Equipment Keyloggers are utilized for keystroke logging, a system for catching and recording machine client keystrokes. They connect to between a machine console and a machine and log all console action to an inward memory. They are intended to work with PS/2 consoles, and all the more as of late with USB consoles. An equipment keylogger seems just as a USB pendrive (thumb drive) or some other machine fringe so that the victimized people can never