codegurukool.com · Free coding tutorials & online compiler

Home › CSS Tutorial › CSS installation

CSS installation

Full step-by-step installation for Windows, macOS and Linux.

Step 1: Install a code editor

  1. Open code.visualstudio.com and click the Download button for your system.
  2. Windows: run the installer, accept the agreement and tick Add to PATH and Open with Code. macOS: open the downloaded zip and drag Visual Studio Code into the Applications folder. Linux: run sudo snap install code --classic or install the .deb file.
  3. Open VS Code once to make sure it starts.

Step 2: Create your files

  1. Create a folder, for example my-site, and open it in VS Code.
  2. Create index.html and style.css inside it.
  3. In index.html, add <link rel="stylesheet" href="style.css"> between <head> and </head>.
  4. Write a rule such as h1 { color: crimson; } in style.css and save both files.

Step 3: See the result

  1. Double-click index.html to open it in your browser.
  2. Change the CSS, save, and press F5 to see the new look.

Tip: inspect any page

Press F12 in the browser to open the developer tools. You can try CSS live on any element before you write it in your file.

If something goes wrong

Commands in this lesson

href

Definition: Attribute of a that sets where the link goes.

Syntax:

<a href="URL">text</a>

Example:

<a href="https://example.com">Go</a>

Example code

<style>
  h1 { color: crimson; }
</style>
<h1>CSS is working</h1>

Run this code in the online editor

← CSS selectorsColors and text →