Chapter 2: Styling Elements

Introduction

In this chapter, you’ll learn to create more structured styles using internal CSS and various CSS selectors. You’ll also explore fonts, links, and lists, as well as add visual effects with shadows and gradients. Comments will help keep your CSS organized and understandable.

Topics Covered

  1. Internal CSS: Apply styles within the <style> tag in the HTML document’s <head>.
  2. Selectors: Use CSS selectors to target specific elements.
  3. Fonts: Set font families, sizes, and styles.
  4. Links: Style hyperlinks to change appearance on hover, active, and visited states.
  5. Comments: Annotate your CSS with comments for organization.
  6. Shadow Effects: Add box-shadow and text-shadow for depth.
  7. Gradients: Create linear and radial gradient backgrounds.
  8. Lists: Customize bullets, list styling, and indentation.