Example of Hyperlink Cues with Favicons

On this page, the javascript looks for a div tag with the class of "blogentry". Then it goes through every link in that div to see if the href starts with "http:", which would indicate that it's an external link. If so, it grabs the favicon off that domain name and inserts it after each link. If no favicon exists, it uses a locally stored image (external gif here) to indicate the link is external. If you wanted to change the class name to suit your needs, make sure you find 'blogentry' in the javascript and change it to whatever class name you want.

Div class="blogentry"

Because this div has a class of blogentry, favicons should show next to external links

For sake of demonstration, and to make it easy for you to view source for everything, both CSS and JavaScript are in the head of this document. In real-world implementation, it is best practice to use external files for each when possible.