Favicons are those little icons you often see in your browser’s address bar. They are
attached using the link method discussed earlier, although you only need to include three
attributes: rel, href, and type. The type value can change, depending on the file type of
your favicon. For example, image/png is fine if you’ve used a PNG.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
These days, favicons are almost ubiquitous, and they provide users with an additional
visual clue to a site’s identity. Although not particularly useful on their own, they can be
handy when trawling through a large bookmarks list—you can look for the icon rather
than the text. However, don’t rely on them instead of a good web page title—they should
merely be an additional tool in your arsenal.
WEB PAGE ESSENTIALS
41Attaching a JavaScript file to a web page is similarly painless. You do so via the script element,
as follows:
<script type="text/javascript" src="javascriptfile.js"></script>
attached using the link method discussed earlier, although you only need to include three
attributes: rel, href, and type. The type value can change, depending on the file type of
your favicon. For example, image/png is fine if you’ve used a PNG.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
These days, favicons are almost ubiquitous, and they provide users with an additional
visual clue to a site’s identity. Although not particularly useful on their own, they can be
handy when trawling through a large bookmarks list—you can look for the icon rather
than the text. However, don’t rely on them instead of a good web page title—they should
merely be an additional tool in your arsenal.
WEB PAGE ESSENTIALS
41Attaching a JavaScript file to a web page is similarly painless. You do so via the script element,
as follows:
<script type="text/javascript" src="javascriptfile.js"></script>
No comments:
Post a Comment