Skip to Content

Basics of Web Design
HTML5 & CSS   Sixth Edition

Chapter 4 – Cascading Style Sheets Basics

Web designers use CSS to separate the presentation style of a web page from the information on the web page. CSS can configure text, color, and page layout.

CSS first became a W3C Recommendation in 1996. Additional properties for positioning web page elements were introduced to the language with CSS level 2 (CSS2) in 1998 but did not reach official Recommendation status until 2011. CSS level 3 (CSS3) properties support features such as embedding fonts, rounded corners, and transparency. The CSS specification is divided into modules, each with a specific purpose. These modules move along the approval process independently. The W3C continues to evolve CSS, with proposals for many types of properties and functionality currently in draft form. This chapter introduces you to the use of CSS on the Web as you explore configuring color on web pages.. This chapter introduces you to the use of CSS on the Web as you explore configuring color on web pages. Resource websites and chapter links are listed below.

Selecting Colors for your Website

If you are new to design, it can be a tough decision to select colors for your web site. Here are some sites that can help you with the process:

  • Color Designer provides color palettes and tools for hex, RGG, and HSL color specification.
  • Enter any hex color code into Color Hexa and view a sample of the color along with conversion to other color specifications, color schemes, alternatives, shades and tints, tones, and a blindness simulator.
  • not only provides color options but shows example pages with the color scheme you have chosen.
  • Enter a hex color value at and you'll useful color information such as color models (RGB,HSL,HSV and CMYK) and color schemes (triadic, monochromatic, and analogous).
  • ColorJack offers color schemes, a color sphere generator, and a wealth of other resources including articles, software, a blog, etc.
  • The Color Wizard offers a variety of ways to choose and compare a variety of color schemes related to a chosen starting color.
  • Eric Meyer's Color Blender is very useful when you want to create site with a monochromatic color scheme.
  • Sometimes designers choose colors based on a photograph. Visit to select a image from the Web and choose colors from from the image for use in your site.
  • Color Wheel Pro - a program that allows you to see color theory in action: you can create harmonious color schemes and preview them on real-world examples.
  • Adobe Color CC offers an easy way to browse color schemes or search for a color scheme based on a keyword or theme, such as desert.
  • Bruce Clay offers an overview of using color in web design focusing on the hidden meanings of color, branding, and the power of color.
  • offers a collection of color combinations for your choice and even provides a method to quickly grab the color palette of a web site.
  • COLOURlovers is a good place to visit to generate ideas about color schemes.
  • Generate a color scheme from a photogrpah using,
  • An article with examples of the impact of color on accessibility at

Color Contrast

When you choose colors for text and background, verify that there is sufficient contrast between them for easy reading. The following tools can be helpful:

Psychology of Color

Web Design Tips

  • Choosing colors for a website can be a difficult task. One method is to use the colors found on the corporate logo or main image of the website.
  • Choosing colors used in a central image usually results in color combinations that are pleasing. By repeating the colors found in the central image on other places in the page, a sense of unity is created.
  • For your Design Inspiration: CSS Zen Garden!

Chapter Updates

  • No updates have been reported for this chapter.

Questions or Comments

The author would like to hear from you!
Feel free to contact the author with your questions or comments.

Basics of Web Design 6th Edition

Review Activities

Review Games

Review activities are available for this chapter. Check your knowledge of chapter terms and concepts.

CSS Documentation & Validation

CSS References

HSL Color Resources