All of the text fields below (e.g. ) contain HTML. Use you mouse or keyboard to copy and paste the HTML into a "plain text editor" (e.g. notepad, textpad).
Save the file to your desktop as an HTML file, (e.g. file_name.html). Once they are saved, you can double click on them or use your keyboard to open them. They will automatically open in your default Web browser. When the files are open in your Web browser, you will be able to see how the HTML works in your browser.
Various Web browser types will display the HTML differently.
************************************************************************************************************
Lesson 9:
Hyperlinks to Images:
The image tag <IMG> can pull images into your HTML documents inline (on the Web page). However, this requires that the image be supported by your browser. Lesson 7 covered image types and gave you a general purpose understanding of what images were supported by the Web (display within your browser) and some others that were not supported. Nevertheless, you can still display non-supported images, just not within the browser.
In the following examples, fictitious image file names are used. You will need to supply real images and file names for the code to work in your HTML pages. The "file path" will need to be accurate as well. For more on file paths, use a search engine and these key words (HTML file path syntax). You will also need the right "application helpers" to view the files (a program that supports opening a particular file type).
The above source code would display the text link "Link To Image". Clicking on the text link would open up the (.pcx) file in whatever application was the default viewer for this file type. (.pcx) Files are not supported by your Web browser so another application would be used.
HTML files end in (.html), which is a file type or "file extension" as they are more often referred to. However, you could just as easily link to a Word file by using the (.doc) extension or an Excel file using the (.xls) extension. This can be extended to most file types, however, the end-user needs to have an application on their system capable of displaying that particular file type.
Application Helpers:
Application helpers are outside Windows or Mac programs that know how to handle external formats. Microsoft Paintbrush is capable of handling a (.pcx) file. Therefore it could be utilized in displaying a (.pcx) file.
Below is an example of a (.pcx) image being used in the HTML source code. If you cut and paste this source code to a text file and open it with your browser, you should experience an application helper opening to display the image once the link that references the (.pcx) file is clicked. Note, it you are using Windows, but you've chosen a different application to be associated with (.pcx) file types, it's probable that some other application will open. If you are a Mac user, you will trigger the opening of whatever application supports (.pcx) files on Mac systems.
Copy the above source code to your text editor and save it as lesson9.html
Open the file in you browser to see the results! Click on the "link" to trigger an "application helper".