HTML and CSS Reference
In-Depth Information
For example, the following code uses the media attribute to indicate to browsers that
the linked resource is suitable for printing:
<a href=”orderform.htm” media=”print”>
View an Order Form
</a>
The media attribute doesn't instruct the browser to print the linked fi le; it just tells the
browser for what kind of output media the fi le has been designed. On the other hand,
the following code uses the type attribute to indicate the fi le format of the linked fi le:
<a href=”photo.png” mime-type=”image/png”>
View the photo of the month
</a>
In this case, the browser is forewarned that the linked fi le is a graphic image fi le in
the PNG format. Some browsers can use the mime-type attribute to load applications
and programs to view the linked document. But in most cases, the browser determines
the fi le format as it receives the document from the Web server, and thus no mime-type
attribute is required.
Specifying a Folder Path
In the links you just created, you specifi ed the fi lename but not the location of the fi le.
When you specify only the fi lename, the browser assumes that the fi le is in the same
folder as the document containing the hypertext link. However, large Web sites contain-
ing hundreds of documents often place documents in separate folders to make them
easier to manage.
As Gerry adds more fi les to his Web site, he will probably want to use folders to orga-
nize the fi les. Figure 2-14 shows a preview of how Gerry might employ those folders. In
this case, the top folder containing all of the content of the Web site is named camshots .
Gerry might place some of his HTML fi les within the pages folder, which he would then
divide into three subfolders, named tips , glossary , and articles . He could also create
separate folders for the images and video clips used on his Web site.
Search WWH ::




Custom Search