W3.CSS ColorsLesson 55Free preview
W3.CSS Color Classes
This lesson is part of W3.CSS · All levels
Summary
W3.CSS presents ready-to-use color classes such as .w3-red, .w3-blue, and .w3-green for the background element. With different prefixes you can set the color text, the background while hover, and other elements consistently. The system speeds up page coloring without writing hex values one by one. (.w3-hover-) (.w3-text-)
Key points
- The .w3-* class sets the background color, for example w3-red to red
- The class .w3-text-* sets the letter color
- The class changes background when the cursor is attached (.w3-hover-)
- Select a few accents to keep the look uniform
- Always check the contrast of the text with the background to make it readable
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.