|
|
||
Chapter 5: Bringing your webpages to life with imagesThis chapter shows you how to add images to your webpages. Images play an important role in modern Web design. When used successfully, images add interest, act as a memory aid for people visiting your site to remember it in the future, and can assist with the successful dissemination of complex information to site visitors. A Quick Overview on FilesWe'll begin this tutorial chapter by briefly summing up the underlying concepts of files. You will need this information to understand how images are added to websites. As you probably already know, there are many different types of files. For those of you who are not entirely familiar of what they are, here's a brief overview: A file is simply a collection of related computer data that contains some form of information. For example, the webpages that you have created so far are files. Each has a unique name that you specified, and each contains computer data that you can open, read, edit, and save. There are many different types of files such as video files, sound files, word processing files, spreadsheet files, image files... the list goes on. In this chapter, we will concentrate on the image files. Each file on your computer usually has a file extension. The file extension usually consists of a full stop followed by three to four characters. These characters tell the computer what type of file it is. For example, the most common file extension for Web pages is .htm (although .html can also be used). Image Files and HTMLUnlike when an image is inserted into a wordprocessed document, image files are not inserted directly into a webpage. Instead, a link is specified to the location of the file. As was discussed in Chapter 2, HTML webpages are actually plain text documents that contain formatting instructions. Since plain text documents only contain text, all other (binary) files must be linked to it. Since you can't add images into a file that only consists of text, you will need to link to the image file using HTML code. Although browsers support a wide range of image files, you should always try to use the GIF and JPEG file formats wherever possible. Many of today's image editing programs will be able to convert your image files into these formats.
Inserting Image FilesThe element used to insert images into files is Essentially, the code to add an image called picture.gif to your Web page is Image AttributesThere are a number of attributes which you may find useful when working with images: Combining Hyperlinks with ImagesAs mentioned in the previous chapter, you can use images as hyperlinks. Simply replace the text between the In the next chapter, you will learn how to take image hyperlinks one step further in Chapter 6: Image Maps. |
||
![]()
A Multimedia Australia website.
Copyright © 2001 - 2010 Multimedia Australia Pty. Ltd.
Australian Company Number 096 830 394. All rights reserved.
ABN 78 096 830 394
Terms of use. Disclaimer. Privacy Statement.