Learnmonkey Learnmonkey Logo
× Warning:

The tutorial you are reading is currently a work in-progress.

Setting Up CSS

How do I setup CSS?

It is actually very easy to get CSS setup. To do that, first, make a file in the same directory as your index.html file called style.css. This is where all of our CSS will go. Then, in your index.html file, add the following code into your HTML file's <head> tag:

<link href="style.css" rel="stylesheet" type="text/css" />

We will discuss what this code means later.

Checking If It Works

Once you have CSS added into your HTML, add the following code into the a file called style.css:


body {
    font-family: sans-serif;
}
    

Now, instead of your page looking like this:

Welcome to My Website!


It should look like this:

Welcome to My Website!


We will discuss how this works in the next lesson.