Tuesday, February 20, 2007

How to Post a Website in a Comment

Frequently my readers know of resources or documents relevant to my postings and you post them in the comments. It's great, like an intelligent search engine. Some of the URLs are long, and sometimes they appear truncated or overflow the column. There's an easy way to prevent that. I usually start by explaining how something works, and then get to the result, but today I'll do it backwards. The following line is all you need to know.

<a href="http://www.website.com">text to click on</a>

If you want to post a comment with a URL in it, all you need to do is highlight and copy the above line, and paste it into the comment box. Then you can edit it to insert the real website URL, and the text to click on. Be careful to leave the quotation marks in place around the URL. That way you can type a really long URL but all that displays in the comments are the words you link to, the text to click part of the formula. The text to click on will automatically be displayed like that: underlined and/or in a different colour so that people know they can click it.

In case you want to know what that means, I'll tell you. But you can ignore this paragraph if you don't care or already know. When you tell a webpage to display something you use tags. The tags tell the computer what to do with the part in between, whether it should be displayed as a picture or a paragraph, how big it should be, what colour, what style and if it is connected to other text. The tags go before and after the stuff you want to display, like the opening and closing credits of a movie, except instead of theme music you get angle brackets. The less-than sign is the opening angle bracket. A link comes under the category of "anchor"--you're hooking your text to the text on some other webpage. So a is the opening tag. After that comes a code specifying the kind of anchor, a hypertext reference, so href. And then you specify the reference itself, the URL in quotation marks. And that's the end of opening tag, so you close the angle brackets, giving <a href="http://www.neatwebsite.com">. Don't put a space after the >, just type the text you want clickable right up against it. (It will still work if you leave a space, it will just look dumb). And then after the clickable text, you type the closing tag. The closing tag is simply the opening tag preceded by a slash: that's the bottom-to-top, left-to-right slash that is on the same key as the question mark. </a>. Done.

There's another strategy for making long URLs managable, and that's a service like tinyurl. You can paste any URL you like into the window at that site, and it will give you back a gobbledegook URL that is very short. That is very useful if you have to write down a long URL or dictate it over the telephone. I prefer to see the real URLs on websites, so I have some idea where I am going before I go there. I can't tell whether http://www.tinyurl.com/ad45g is cartoons, porn or airplanes. Also I can't click on it. I have to open a new browser to copy and paste into. Whereas if someone links to something directly, like this I can check it out in advance if it seems to be a good neighbourhood on the internet by placing my mouse over it and looking at the bottom of my window before I click. You'll see the one above takes you to "nastystuff.ca" which probably doesn't exist, but doesn't sound like a good place to go for information on fireproof lifejackets.

Nothing to do with airplanes, but at least it's not the same story as last week.

Oh and you're all welcome to post your websites or other favourite URLs in the comments just for practice.

19 comments:

Colin said...

I have a blog but I don't have comments. You covered the possibilities well. It's too bad Blogger doesn't add the Javascript or whatever that shows the URL when you hover as a tooltip.

Anonymous said...

So I'm Just practising here. Nothing to see. Move along quietly.

Anonymous said...

That's my favourite bit of html. Well, the only bit.

Christopher said...

Guilty as charged...

Thanks for the wee bit of dual instruction. I've had no luck at all previously in my feeble attempts to get the tagging to work, but then, I'm not a regular blogger/poster.

Paul B said...

here's a url for you to look at:
Flybe are recruiting

It seems that you can apply online for their posts, which include pilots & FOs.

nec Timide said...

Colin:
You can use the TITLE specification in the Anchor tag:
<A HREF="http://putorius.blogspot.com/" TITLE="putorius.blogspot.com">nec Temere nec Timide</A> which ends up presenting like this: nec Temere nec Timide.

You can put what ever you want in the TITLE: nec Temere nec Timide.

Anonymous said...

If you mention tinyurl, don't forget hugeurl:


Anonymous said...

I wondering what kind of nasty stuff I can bury in a tiny url?

At one point, you could create an URL string so long it would overwhelm IE's ability to display it. It could look like you were going somewhere, when I was taking you somewhere else.

At another point in time, special characters in an URL string would erase the printing characters, again taking you one place while you thought you were going to another.

But then, I'm paranoid, I know.."You don't know the power of the dark side..."

--paul

Anonymous said...

Er, http://hugeurl.com

Aviatrix said...

bayareapilot: so close, but can you make it into a link to avoid the necessity of cutting and pasting?

dailyaviator You somehow managed to include my URL as well as yours in your link, making a link that goes nowhere.

Everyone else gets full marks for linking skills, plus nec timide gets bonus marks for including a title tag.

paul your security concerns are noted. No one should trust that a URL goes to where it says it does.

paul b The little footnote about "easily" converting my licence to JAR/CAA at my own expense is very expensive and time consuming. It's not off the list, but it's further down the list than you might think.

Aviatrix said...

I'm just lazy. Trying to make my life easier so I can just click instead of going to all the trouble of spawning a new tab and cutting and pasting the URL. It's like WORK or something.

Anonymous said...

http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com
http://dreamsteam.freehostia.com

Aviatrix said...

Okay, that one is just spam, but they didn't even post their URL properly, so I'm going to leave it, because it's funny.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

how do you get your url to link to your name, using blogger comments.

I choose "other" enter my name and website. But if you click on my name it gives you a 404 not found error. Mike Agar yours works somehow what did you do differently?

I want it to some up as weightlossweapons.com/blog

Thank you

Aviatrix said...

Steve, the trick is to put the whole URL in the box, not just the end. Preface what you've got with http://

You're not going to get a lot of people clicking on yours, because anything about weight loss looks like spam, but I checked yours out and while it may carry a lot of advertising and product placement, there is certainly enough actual content to qualify it as an actual blog.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Aviatrix said...

I'm locking comments on this entry because it's starting to gather spam.