Sunday, November 23, 2008

Blogging School

I thought I’d take a break from normal posting today and share something useful instead. When I started blogging, I noticed that some people included basic text formatting in their comments. Later, I saw embedded, clickable links, where the commenter didn’t just paste the link as text. So, I decided to find out how to do those things, too. Since I had to go looking for the information, I thought I’d share it in case any of my readers wanted to know, too.

Since web pages are built on HTML coding, that means we can add HTML “tags”, or instructions for how text should appear, to comments. We can use these tags to make type appear bold, italic, bold italic, etc. However, it’s important to remember that not all blogging comments systems accept tags (Typepad is one that doesn’t seem to, for example). For those that do, here are some basic tags:

To use them, you type the tag you want, type the text you want formatted, then type the closing tag. It’s really that simple.

Now suppose you want to include a link to an article, a post on your own blog or a relevant website. First, it’s important to remember that including a link may make your comment look like spam to the blogging software, so keep it to one or two links. Second, not all commenting systems allow links (mostly because of spam problems).

For this example, we’ll assume links are allowed, and that we wanted to link to Google News in the comment. A tag like this would do it:

In this example, the phrase “the Google News page” would be the link. You can make the link say anything you want, but keep in mind that not all commenting systems make links obvious, so on those blogs you may want to use a phrase like “click here”. Also, whatever you type before that link won’t be part of the link. So, in this example, you could type: “For the latest news stories, you can go to” [here is where you place that link above]. What you’d end up with is this:

For the latest news stories, you can always go to the Google News page

Feeling like you want to be really advanced? How about adding a tag so the link will open in a new window or tab? Normally, if someone clicks on a link it’ll open in the same window/tab, replacing what they’re looking at, but by adding a little more code you can make it open in a new window/tab (depending on the browser the reader is using). So, using the same example, it would look like this:

Many blog comments systems don’t permit a target tag—Blogger doesn’t for example—and again the reason is because of spam. But if you use it on your own blog posts, you can make sure that the reader won’t accidentally leave your site just because they clicked on a link. That improves the chances that they’ll read more on your site. WordPress and other blogging software makes this really easy, but Blogger doesn’t: You have to edit the HTML for your post and enter the last part, target=_blank/", manually (space before the word "target"). This is what I did to the Google News link I have above (the one in the text, not one of the pictures).

So, that’s it—just a few things I learned and thought I’d share for others who don’t know them. Feel free to try them out in the comments to this post if you want, and have fun—that’s kind of the whole point of blogging, after all.


d said...

Sweet! To be honest, I knew most of this stuff, but the "Target" one is good to know.

Since I'm on a Mac, if I'm browsing a blog or webpage and want to click a link, I hold down the 'control' key before I click. It brings up a box that gives me the choice of opening the link in a new tab or window.

Arthur Schenck said...

The target one was driving me mad—until I started the WordPress blog for the podcast, where that's easy to do (I looked at the HTML to find out what the tag was). You can also add a hover title, so when someone puts their mouse over a link it says something, like the title of the blog/article, or a comment like, "This is awesome!"—whatever you want. I do that all the time on my podcast blog, but it's alot more complicated to explain, so I decided to stick with just this.

On a PC you can right-click on a link to get a pop-up for how you want to open the link, and I have my Mac's Mighty Mouse set up the same way. This is an alternative to having to Control-click on a Mac (many PC users complain about the "one button" mouse that's actually not one button if you change the settings).

Anyway, with Firefox on the PC, if you click the scroll wheel on your mouse it'll open up the link in a new tab (other browsers usually need to be configured). That doesn't work by default on a Mac because that move usually brings up Dashboard, but everything's configurable.

The point of adding the target tag is really to make it so people who don't know about, or forget to do, these various clicking options will automatically open a new window/tab.

Roger Owen Green said...

I was in some web listserv and the predominant point was that doing that thing to open another page was considered...RUDE. I didn't understand it then, and I still don't.

Arthur Schenck said...

I'm with your, Roger—I can't figure out why that would be rude. When I visit a site, I usually open links in a new tab, but sometimes I forget or my finger slips, so I'm glad when the site owner has used the target tag so I don't have to click "back" to return to the original site. So, to me, it's a courtesy to readers, and not at all rude; since I appreciate it, I think other readers would, too. I'd be curious to know if more people think it's rude and—more importantly—why.