Monday 17 November 2008

How to put web links in blog comments

It's a lot easier than you think.

First, a simple example to show how tags work, using < and > which are accessed from the comma and full stop keys when pressing shift.

Italics

If we put <i> tags around some words, it switches on italics mode from the first <i> tag and switches it off again when it reaches the </i> tag.

If your blog comment contains <i>some words like this</i>, then when the comment is published those words will be in italics like this.

Bold

If your blog comment contains <b>some words like this</b>, then when the comment is published those words will be in bold like this.

Web Links

To put a click-able web link in your comments, use <a> "Anchor" tags :
use <a href="http://your.web.link/">the words you want to be the link</a> for this.

An <a>and</a> around something will make it appear in blue, underlined etc (whatever your browser preferences have been set to). It won't link to anything yet, though. We need to put the weblink in. This is done by putting HRef="the web address" inside the first <a> tag (HRef means Hypertext Reference - uppercase doesn't matter, so HRef Href href all work).

The web address is easily snatched from the web browser's link bar. Go to the webpage you want to share with us, click in the address bar so that the web address (http://something...) is highlighted, and press the Ctrl key and then C at the same time to make a copy of this invisibly behind the scenes (you won't get any confirmation of this) into the Windows 'clipboard'.

When you come to write your blog comment, use Ctrl+V to 'paste from the clipboard' and that saved address will magically return and be inserted into your comment.
It's easier to start with <a href="">the words you want to be the link</a> and then go back to the point between the "" and insert the link then.

When you preview your comment you can check that it has indeed worked, before you click to publish it. In fact if you click the link while pressing the shift key, it will open in a new window to prove it has worked.
Simple as that!

Note for the curious

How did I get <> to appear here, then?
There are a series of & codes that show as particular characters. Putting gt or lt (greater than or less than) after a & makes <> appear in the rendered web page.

1 comment:

Zoompad said...

That is really helpful, thanks!