Lesson Practice 2-2:
Say It With Pictures!
Task 1: Acquiring Image Files
- Your folder named 'images' will contain all picture/image files associated with your web pages.
- Visit various free clipart web sites, choose and save the following images to your Lesson Site images folder:
1 simple, unobtrusive background tile or border graphic
1 decorative horizontal line or bar
3 interesting graphics/pictures (not too large)
2 button-style graphics
Task 2: Using Images on Web Pages
- Open your template.htm in notepad++.
- In the title element, add the title: Using Images
- Add an h1 element with the page title: Improve Page Presentation with Images
- Adding a background image:
- For the time being, you will use an attribute to add the tile or border graphic as a background image to the opening body tag. Later you will replace this setting with a CSS control.
- To the opening body tag, add the attribute background=" "
- As the value between the quotes, type a relative to
your image.
- Add text content:
- Add a paragraph element containing the image of your horizontal line or bar, using the src=" " attribute in the img element. Use a relative path to the image.
- Add a several paragraph elements with a lot of nonsense text, to fill 2-3 screens in preview. This is to simulate real text in paragraphs. It might be easiest to open the Lorem Ipsum file, which contains some pseudo-text you can copy and paste as your page content. Be sure to create a separate paragraph element for each paragraph of text.
- Save the file in the graphicfiles folder as imagetest.htm.
- Resave the file in the same location as buttontest.htm.
- Add image content
- Reopen the imagetest file if necessary.
- Just before the beginning of the paragraph text, add one of your images in an image element. Add the align="right" attribute, to align the image to the right. Make the source a relative path to your image.
- Use PhotoEditor or some other imaging program to check the dimensions, in pixels, of your image. If you need help with this, ask Mrs. Pangman.
- Add attribute to the img element to set this height and width.
- Move to the beginning of a paragraph about 1/3 of the way down the text on your page, add the same image, this time left aligned, with attributes set to half the original height and width.
- About another 1/3 down, between two paragraphs, add a different image, at default size, with no alignment specified. Include height and width attributes.
- At the end of the text, add another paragraph element. Insert your third image here, with height and width.
- Add the alt=" " attribute to each of your images, using appropriate text to describe/explain the picture.
- Save your work and preview it in the browser. Make any line break and spacing adjustments you need, and when you are satisfied, save and close the file.
Task 3: Using Images in Links
- Add buttons and create image links:
- Change the title and h1 elements to read:
Use Images as Links
- At the end of the page of text, add a paragraph element containing an image element using one of your button graphics. Add one or two spaces to the right of the image, then the text:
Click here to go to … (include wherever you choose at the ... , a page, a site, or your email).
- Make a hyperlink using both the button and the text together.
- Add one more paragraph element and add the other button graphic. Make a hyperlink from this second button, adding space as before and the text
Click the button to return to the top
- Add the appropriate attribute to the opening tag of the h1 element to create a top of page bookmark.
- Create a hyperlink, but this time, just use the image and link to the bookmark.
- Preview in the browser, and test the links in your document. Add horizontal or vertical spacing to any image you think needs it. Make any line break and spacing adjustments as needed and when you are satisfied save and close.
Task 4: Add Image File-links to your Home Page
- Open your file index.htm.
- In the Image Pages section, add two paragraph elements.
- Link to one of the image files in each paragrah element, using the page title for the link text.
- Add the title=" " attribute to each, using the filename of the page.
- Save and preview, testing the links, and making any adjustments needed.
- Publish your new files, as well as your updated index file to your folder of the class Share file.
- Open the index file in the new location and test your links.
|