June 20, 2008

Adding links to comments

As one gets into blogging more, it becomes helpful to leave live links in a comment or post. While most text editors will take care of posts, this is not the case for most comments, which are primarily straight text. Yet most commenting dialog boxes like the one here for blogger allow the use of some of the most common HTML tags in order to allow for some formatting of a comment.

There are three primary HTML tags you might use <b>, <i>, and <a>. Each of these tags allows you to control the formatting of your text in your comment, which can be very useful. I’m not going to teach everything about HTML here just some very simple basics so you can use these three in comments.

HTML tags are a lot like (parentheses) or “quote marks,” you need a starting mark and an ending mark, and then they do something to your text. The way we make an ending mark is to take a starting mark and add a slash to it. So the mark <b> is completed with </b> for example. Always use a beginning tag and an ending tag, other wise you will get very unexpected results, if the comment page will even let you send it.
To make something bold we use the <b> tag. For example:

I’m gonna make a <b>bold</b> statement

Which when posted reads:

I’m gonna make a bold statement.

Italic works the same way, with the <i> and </i> tags.

The <i>Italic</i> might just be an unsinkable ship

Which when posted reads:

The Italic might just be an unsinkable ship

While <i> and <b> might makes the comment pretty, <a> is very powerful. For brevity, I’m just going to show you one thing they can do: setting up a hyperlink. In the case of <a> there is more included in the tag than just <a>. We also include a notice to the computer that we want to link the stuff in this tag to go to a certain place, usually another web page. To do this the tag lengthens to

<a href= “http://ehblogger.blogspot.com”>

For example if I wanted to go to the website ehblogger.blogspot.com. I can change the address in the tag to go anywhere I want on the web. After the <a> tag begins we then put what will click on to go to the link specified. We end that with the </a> as in the the other cases to make the link. For example:

This link makes you <a href= “http://ehblogger.blogspot.com”> go to EHBlogger</a>

Gives a result of

This link makes you go to EHBlogger

If you click the link, then you will be taken to that web page. As a suggestion for using links in comments, use between the <a> and </a> the actual address so if the link does not work due to security measures on the computer reading it, the reader can cut and paste the link into the address bar. For example:

<a href= “http://ehblogger.blogspot.com”>http://ehblogger.blogspot.com</a>

This does require a lot more typing and you do need to be very careful for typos, but it makes it one step easier for someone to get to the site you want them to visit, and that in turn increases visits.

Any questions please leave comments below. Also try this out in the comments for this post. The worse you can do is get an error message from the blogging software.

1 comment:

Jen@Balancing Beauty and Bedlam said...

THANK YOU, THANK YOU!! I have been trying to figure out how to do that, and I practiced on my blog first. :)