Lecture
Continuing to get acquainted with CSS, today we will learn more about HEX codes. The color property with an assigned hexadecimal HEX code (hexadecimal (hex) code) is used to color the text. For example, body {color: # 000000;} means that all the text inside the <body> tag of your page will be black.
A background property with an assigned HEX code exists to give color to everything that is not text. For example, body {background: #ffffff; } means the background will be white.
Paste the following code under the body {} selector:
one 2 3 four | a, a:visited{ text-decoration : underline ; color : #336699 ; } |
You made all the links underlined (text-decoration: underline;) and highlighted in blue (color: # 336699;). This is a different shade of blue, but it is blue, because the last two digits characterizing the degree of blue are the largest.
one 2 3 four | a { text-decoration : underline ; color : #336699 ; } |
and
one 2 3 four | a:visited { text-decoration : underline ; color : #336699 ; } |
we list the attributes separated by commas to apply the same parameters to both selectors at once.
Paste the following code under a, a: visited
one 2 3 | a:hover{ text-decoration : none ; } |
What does it do? You have verified that the underlining of the link disappears when you hover over it, hence a: hover. If you do not want the default underscore, and that it appears only during the cursor, then change the value of the text-decoration parameter : for a and a: hover, vice versa. If you want the link to change color when you hover the cursor, add color: and any color code. For example:
one 2 3 four | a:hover { text-decoration : none ; color : #ff0000 ; } |
For now, try and do not be afraid to make mistakes and ask for advice!
Comments
To leave a comment
Content Management Systems (CMS)
Terms: Content Management Systems (CMS)