Home > Teaching > Tutorials > HTML Tutorial

Cascading Style Sheets (CSS)

Manipulating text fonts, sizes, colors, etc. is conveniently done in a cascading style sheet (CSS). This is a completely different page than the HTML pages it affects, and it is referenced in the head portion of a page using the following:

<link rel="STYLESHEET" type="text/css" href="mycss.css" />

All (well, most) of the HTML text details are often held in this CSS page. We can make all paragraphs have a certain style by inserting the following lines in the css page:

	p {	color: #484300; 
		font: 10pt Arial;
		line-height: 16pt;
		margin-left: 25;
		max-width: 530;
	  }

We can do this with all sorts of tags, including the body, table, font, and header tags (ex, h4), and we can also define css classes. This is beyond what we'll cover today, but enough details to make a lot of headway on CSS can be found on w3schools.com.

Previous: tables Next: Javascipt, DHTML, and PHP