Lecture Summaries class 13

Prepared by: Anthony Larrain

These notes serve as an outline to the lecture, they are not intended to be complete. Attend class to get more details.


Linking to files on your web site

Your directory structure at your students account should be similar to this

		public_html

		   hci201

	 hw  labs  quiz  project

For the following examples, assume we are in any HTML file in the quiz directory.


External Style Sheets

Up until now the styles we have been adding were placed in the HTML file between style tags.

Example

<head> <title>Example Style</title> <style> body{ font-family:Verdana; } h1{ color:lawngreen; } </style> <head> <body> : :

We can also place the CSS style rules in a text document, which is saved with a css suffix.

The prefix can be any legal filename

Suppose we had a text file named style.css that contained some styles.

To use these styles we need to link this file to our HTML document.

To do this we use the HTML link tag.

<head> <title>Linking to an external CSS file</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head>

Example

The HTML   The External Style Sheet


CSS Selectors