Create a Style Sheet For Webpages

Step 1. Create a Style Sheet

Create the file myfirststylesheet.css containing the following lines.

body
{
  font-size: 1.0em;
  font-family: arial;
  color: black;
  background-color: yellow;
}

h1
{
  font-size: 1.3em;
  font-family: helvetica;
  color: purple;
  background-color: red;
}

h2
{
  font-size: 1.2em;
  font-family: times new roman;
  color: black;
  background-color: green;
}

h3
{
  font-size: 1.1em;
  font-family: comic sans ms;
  color: grey;
  background-color: blue;
}

p
{
  font-size: 1.0em;
  font-family: georgia;
  color: orange;
  background-color: #f0f0f0;
}

Step 2. Add The Style Sheet To a Webpage

Add the following line to any of your webpages. It must be in the head section of the web page. (Between the <head> and </head> tags.)

<link rel="stylesheet" href="myfirststylesheet.css" />

For example:

My First Webpage With My First Style Sheet