Our CSS styles are enclosed within a tag in our HTML document. We are not using a CSS file for our styles. Alternatively, we could have set the text color to gray using a hexadecimal value or an HSL value. We could specify “rgb(128, 128, 128)” in place of “gray” if we wanted to refer to an RGB color value. To do so, we use a color name value (“gray”). Then, in our CSS code, we create a style that sets the text color of all To define a paragraph of text describing the Peterson and Sons grocery store. Two months after graduating, I found my dream job that aligned with my values and goals in life!" "Career Karma entered my life when I needed it most and quickly helped me match with a bootcamp. We can set this using the following code: The owners want the website to display a certain block of text in gray font. Suppose we are designing a website for a local grocery store, Peterson and Sons. Let’s walk through an example to illustrate how the color property works. You could use the color property to define link colors in your style sheet. Unless otherwise specified, this will be black. Stands for hue, saturation, and lightness.īy default, the text color used by a web page is text color that applies to the The color property accepts any one of the following values:Ī hexadecimal color. If you want to use a specific color, you may want to use another type of color label. But, these keywords do not describe every color on the spectrum. These keywords are convenient if you want to refer to a standard color, like “red” or “paleblue”.
This rule sets the color of all tags in an HTML document to red. Get Your Coding Bootcamp Sponsored by Your Employer.Education Stipends for Coding Bootcamps.Best Coding Bootcamp Scholarships and Grants.Ultimate Guide to Coding Bootcamp Loans.
Best Free Bootcamps and Coding Training.Best Online Coding Bootcamps and Courses.