Assignment 5 — Working with Images
Description: | This assignment for this week describes how to work with images within your website, the best formats to use for different types of images, examples of using tools you can use to modify images, and how to create links using images. To insert an image on your web page, you use the <img> element. Previous lessons described the basics of using the src attribute to identify the image: <img src="somefile.jpg"/> However, you can use some additional attributes to provide additional information about your image, including:
For example, if you wanted to use all of these attributes, the <img> tag would be as follows: <img src="somefile.jpg" height="200" width="400" alt="The college stadium during a rainstorm."/> The <img> element is an inline element, so if you want to include it on its own line, you need to include it within a paragraph. You can use a variety of different formats for an image, including gif, jpg, and png, Each format has its own strengths and weaknesses.
You can include a image within an <a> element so that the reader can click a picture to navigate to a new web page. For example, if you had a image of a cat and wanted it to open up the Wikipedia entry for cat you could construct the link like: <p><a href="https://en.wikipedia.org/wiki/Cat"><img src="cat.jpg"/></a></p> For more information, see Chapter 5 of the Head First HTML and CSS book. |
||||||||
HTML elements: |
|
||||||||
Videos: | |||||||||
Tasks: |
|
||||||||
Grading criteria: | Your assignment should demonstrate:
|
||||||||
Due: | By 10/23 Note: Project 1 is also due this week. |
||||||||
Example assignment: |