Learning Report 2

Using CSS in your website.

Purpose

Creating a linked CSS sheet for each page in your website will allow you to style and create an attractive website.
It also allows you to make changes to many of your pages through just one style sheet. I have implemented this style
sheet into each of my web pages. Althouh I have not created much style with my CSS Style Sheet yet, you can see it in my
source code for the page in the head section. As I implement style changes to my website this will link my page to that
CSS sheet and it will implement it on each of my pages.

Implementation

The basic steps for creating a linked CSS Style Sheet are listed below.

Create a new sheet in the CSS folder in you site.



Be sure to name your sheet something simple like "screen.css" Make sure that the sheet has the extension css.



To link this CSS sheet to your webpage do the following:



In the head section of your webpage, create a link element adding the href, type, rel, media tags to the link element.

  1. The href refferences the css file.
  2. The type describes what kind of style sheet you will be using
  3. The rel states what kind of sheet you will have.
  4. The media describes what kind of device will be displaying the page.

The coding for this should look something like this:



<link href="/style1.css" type="text/css" rel="stylesheet" media="screen" />



Now that the css file is linked you can make changes to it and it will show up on your page!



Currently the CSS on my site is a work in progress, but the coloring of the background and text of my site are currently using css.

W3schools.com