Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > CSS

  • Print
  • + Share This
This chapter is from the book

Putting It All Together

  1. Using the HTML code you created in Chapter 3, style all descendents of the paragraph tag to bold. This requires using the universal selector.
  2. Style all paragraph siblings. Turn all paragraphs that follow another paragraph to gray.
  3. Add hypertext links to your page, and then use the link pseudo-classes to style them. Remember to style all four link states.
  4. Style the first letter and first line of text of the first paragraph in your page. Start by styling the first line of all paragraphs and then use pseudo-classes to focus on the first paragraph.
  5. Style images with an alt tag value with a black rule and images that do not have a value with a red rule. This is useful for highlighting images you need to add alt values to.
  6. Style your page for print by hiding navigation and using a white background and dark text. You want to consider media other than screen for your designs.
  7. Play around with adding more styles and then changing the order to see how the order affects which styles are applied. Pay careful attention to the cascade order and how specificity affects that.
  8. Play around with adding !important to different styles to see how it affects which styles are applied. Remember, the !important property is very powerful and should only be used to help you style your page while working. The final design should be able to work without it.
  • + Share This
  • 🔖 Save To Your Account