KEY CONCEPTS:
ATTRIBUTES
- Some tags need more than a name in order to work properly. The extra information
is called an "attribute" of the tag.
- Each attribute uses an equal sign to pair it with a value that is placed
in quotation marks.
Example: align="left".
- Some attributes have a limited set of values, like "left", "right"
and "center" for align.
- Some attributes require a value based on your Web site, such as where to
find a file.
- "images/portrait.jpg" for SRC
RELATIVE REFERENCES
- A relative reference tells you how to get to a file from where you are.
Its like being on the second floor of this building and asking how do
I get to the lobby and someone answers, "Take the elevator down one floor."
But if youre in the parking garage, that answer will not work. Instead,
someone would say, "Take the elevator up one floor." Each answer
is relative to where you are. A relative reference is different from an absolute
reference. Using our example, an absolute answer from any floor would be,
"Go in the elevator and press the "L" button. Examples:
Current Directory: ./statue.jpg
Up One Level: ../statue.jpg
Up Two Levels: ../../statue.jpg
Root Directory /statue.jpg
NEW TAG:
Note: attribute names that are in italics are optional.
This tag will insert an image into the page
<img src="images/statue.jpg"
- tells where to find the image
align="left/right/center" - how to align the image to the
text
height="#" - the height of the image
width="#" - the width of the image
border="#" - the border around the image
>
EXERCISE: Insert images and text on three pages
- Create these three Web pages:
- archaeology.html
- art.html
- music.html
- Give each web page a header name
- Insert the text from descriptions.html
into each of the files
- Insert the archaeology.jpg, art.jpg,
and music.jpg images into the appropriate files
- Adjust the text to wrap to the right of the image.