Practice - Comments 1. Add comments at the top of the hs_styles.css file.
Defining a Color in CSS Defining a color in CSS RGB triplets Hexadecimal numbers http://www.w3schools.com/html/html_colors.asp RGB triplet syntax: rgb(red, green, blue) Hexadecimal number syntax: #redgreenblue
Setting Foreground and Background Color Background Color: background-color: color; where color is a color value. Foreground Color (text color): color: color;
Practice – Setting Background Colors and Text Colors 1. Create a style rule for the page for the body page, set the background color to white. 2. Create a style rule for unordered lists within the nav element that sets the background color to the value (248, 175, 175). For every hypertext link within the navigation list, create a style that sets the font color to white. 3. The owner has placed a promotional photo in a figure box. Set the background color of figure boxes to the color value (248, 175, 175).
Practice – Setting Colors including Opacity 1. For h1 headings nested within the section element, create a style rule to: a) set the background color to the value (148, 51, 62) and b) set the font color to white for older browsers and to the color value (255, 255, 255) with an opacity of 80% for newer browsers. 2. For address elements nested within the footer element, create a style rule to a) set the background to the color (148, 51, 62) and b) set the font color to white for older browsers and to the value (255, 255, 255) with 80% opacity for newer browsers.
Your consent to our cookies if you continue to use this website.