Coding task · HTML and CSS course · Module 3: CSS Basics
Setting Colors in CSS
Ancient Egyptians used natural pigments: gold symbolized the gods, blue represented the Nile, red was the desert, and green was the oasis. In CSS, we have different ways to define colors: names (red, blue), hex (#FFD700), rgb(), or hsl(). Learn the background-color property!
Task
Create an Egyptian palette with 4 <div> elements. Each div should have a CSS class (.gold, .nile, .desert, .oasis). In CSS, use background-color: gold (#FFD700), Nile blue (#1E90FF), desert sand (#CD853F), oasis green (#228B22). Add padding: 20px and margin: 10px.