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.
Your directory structure at your students account should be similar to this
public_html hci201 hw labs quiz project
public_html
is the parent of hw labs quiz project
hw labs quiz project
are children or sub directories of public_html
hw labs quiz project
are all siblings of each other
Example - public_html, lab and quiz can contain a file called index.html
For the following examples, assume we are in any HTML file in the quiz directory.
This assumes lab1.html is also in the quiz directory
This assumes cumberland1.jpg is also in the quiz directory
This assumes the quiz directory has a sub directory called images with a cumberland1.jpg file in it.
This takes you back one directory, back to public_html, now we move forward to project and get the index.html file from project directory.
What does this do ?
Up until now the styles we have been adding were placed in the HTML file between style
tags.
Example
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.
Example
The HTML The External Style Sheet
Given the following styles.
Notice the class name is preceded with a dot '.'
Then in the HTML document that uses these styles:
This text would appear blue
This text would appear red
Example
Notice the use of the HTML span
tag
Examples
Example