MENU MORE

How To: Write HTML Links

By Wil C. Fry, Aug. 3, 2013

Copyright 2013 by Wil C. Fry. All rights reserved.


Many of today's popular websites don't require any knowledge of coding or html markup. To post a link, you can just copy-and-paste the web address (URL) of any web page. The site will automatically turn it into a clickable link. This is true of Facebook, Flickr, Twitter, Tumblr, Pinterest, and others.

But doing so often results in a link that looks like this: http://www.flickr.com/photos... — this link goes to my Flickr photostream. But what if you want the link to actually say My Flickr Photostream?

Some of those sites won't let you do it, but many will. Flickr, for example, allows basic html markup in descriptions, comments, discussion threads, etc. Most blogging services allow this as well. Some people call them "pretty links". The following is an example of how you'd write that:

<a href="http://www.flickr.com/photos/saintseminole/">My Flickr Photostream</a>

The URL (web address) won't show up to the viewer, but will be visible to their web browser. (Most web browsers will show the URL to the user if they hover over the link.) The format is as follows:

<a href="URL">Any text you want</a>

Use the target="_blank" attribute if you want the link to open in a new window or tab (depends on browser and user settings).

<a href="URL" target="_blank">Any text you want</a>

If you want the link to be an image instead of text, use the same formatting, but insteaed of the text portion of the link, use html markup to display an image. The image must be hosted on the internet somewhere, and you must know the exact web location (URL) of the image file.

<a href="URL"><img src="imageURL"></a>



Specific to Flickr (since they've deprecated standard HTML code in the Share Menu): Say you want to post one of your images in a group's discussion thread.

1. Copy the photopage URL from your browser's address bar.
2. Go to the All Sizes page and choose your size.
3. Right-click on the image to copy the image file's location.
4. Put both URLs into the following equation:

<a href="photopageURL"><img src="imageURL"></a>

Example: <a href="http://www.flickr.com/photos/saintseminole/8164046303/"><img src="http://farm9.staticflickr.com/8345/8164046303_b8ebf5c10b.jpg"></a>