w1coding.comAll tutorials

CSS Environment Setup

CSS lessons
  1. Environment Setup
  2. Introduction
  3. Tdisplay
  4. Basics
  5. Editors
  6. Syntax
  7. Colors
  8. Background
  9. Borders
  10. Margins
  11. Padding
  12. Width And Height
  13. Outline
  14. Texts
  15. Fonts
  16. Icons
  17. Links
  18. Lists
  19. Display
  20. Tables
  21. Max And With
  22. Positon
  23. Z Index
  24. Dropdown
  25. Overflow
  26. Float
  27. Navigation
  28. Image Sprites

CSS styles an HTML document. Keep the HTML and stylesheet in one project folder so you can understand how relative file paths work.

What you need

  • A browser and a code editor
  • A folder containing index.html and styles.css

Set up your environment

  1. Create an HTML file that contains <link rel="stylesheet" href="styles.css"> inside its head. Add a heading in the body.
  2. Create styles.css in the same folder and add the rules below.
  3. Open index.html in the browser. Save both files after edits.
  4. Inspect the heading in Developer Tools and find the CSS rule that sets its colour.

Your first check

Save as styles.css

body { font-family: Arial, sans-serif; background: #f4f4f4; }
h1 { color: #047857; }

Run or verify

Open index.html, then refresh after saving styles.css.

Expected result: The heading becomes green and the page background becomes light gray.

Common setup problems

  • If the styles do not appear, check the link filename and folder location.
  • Check the browser Network panel for a missing stylesheet; use a hard refresh if an old stylesheet is cached.

Official documentation

Guide reviewed 17 November 2026. Check the linked vendor documentation for current supported versions and operating systems.