Hyperlink style/punctuation question. March 10, 2011 10:18 AM   Subscribe

What is the correct style/convention for hyperlinks and punctuation?

When writing online and linking to another webpage, should I include adjoining punctuation in the hyperlink, or not, or is there some more complicated answer out there?

What if the punctuation is a period or other sentence-ender? It is possible that this is the right way to do it. But, then again, I could be wrong. Does it matter if the entire sentence is a link?

This is a small thing, but it bugs me because I do not know the answer. Some quick googling and seaching of mefi raised an old reddit thread and this article from 2007, but I was wondering if the grammer/web gurus of MeFi have the answer or at least an opinion on this vitally important question.

I recognize that this could also go in AskMe and am happy to repost it there if the mods so wish. I though I'd put it here since I only think about this question here on MeFi.
posted by Aizkolari to MetaFilter-Related at 10:18 AM (60 comments total) 1 user marked this as a favorite

Your first four links point to metafilter.com, is that what you intended?
posted by Brandon Blatcher at 10:19 AM on March 10, 2011


Why yes, I do have an opinion on this. Thanks for asking! As a grammar fan (but not full-fledged grammar nazi), I so rarely get to inflict my will upon others.

I think it looks better to not include punctuation in the link unless the entire sentence is a link.

Feel free to take my personal preferences as gospel.
posted by phunniemee at 10:22 AM on March 10, 2011 [25 favorites]


Yeah, I was just including them as examples of the 5 ways I could think of to include punctuation or not: within a sentence, at the end of a sentence, and if the link is the whole sentence. I suppose the sixth option is if the whole link is a sentence but you don't include the period/question mark in the link.

Like this.
posted by Aizkolari at 10:23 AM on March 10, 2011


I Am Not An Editor, but my personal preference is to exclude punctuation from link text unless the whole line is included in the link, so, e.g.:

1. I think that these pug photos, from various photographers, are great.

2. I think that pugs are great.

3. Seriously, pugs kick ass.

Basically, if the terminal punctuation isn't internal to the text being linked, leave it out of the link unless I'd be stranding it as the only non-linked text on the line. Edge cases where the terminal punctuation actually is intrinsic to the link text are uncommon enough that I can't think of the last time I had to deal with it.
posted by cortex (staff) at 10:23 AM on March 10, 2011 [18 favorites]


As long as you don't do that thing where every letter in a word is a different link I don't really care.
posted by theodolite at 10:23 AM on March 10, 2011 [23 favorites]


IMO, with no formal data to back me up, I'd say that punctuation should not be part of the hyperlink unless the entire sentence is a link.

If the entire sentence is a link, you're A-OK.
posted by litnerd at 10:25 AM on March 10, 2011 [1 favorite]


I have no opinion on the matter, except to say never link to single characters.
posted by 2bucksplus at 10:28 AM on March 10, 2011 [4 favorites]


I think that phunniemee is correct.
posted by Night_owl at 10:32 AM on March 10, 2011


Interesting question. I say yes to including quotation marks, question marks, and exclamation points, and no to commas and period (unless they're in the middle of the linked text).
posted by Rhaomi at 10:33 AM on March 10, 2011


I am an editor and I agree with phunniemee.
posted by kate blank at 10:34 AM on March 10, 2011


theodolite: "As long as you don't do that thing where every letter in a word is a different link I don't really care"

I did that once as a pseudo random link generator. That was back in the day when I was stupid and didn't have a beard.

Come to think of it, the beard came about when I stopped being stupid.
posted by theichibun at 10:34 AM on March 10, 2011


This isn't a matter of opinion, and cortex is exactly right. Pugs do kick ass.
posted by The Winsome Parker Lewis at 10:35 AM on March 10, 2011 [2 favorites]


I've never heard a formal rule about it, but I pretty much follow the formula that cortex explained.
posted by lilac girl at 10:37 AM on March 10, 2011


Gender: This is free form, but go Team Nuts!
posted by shakespeherian at 10:44 AM on March 10, 2011


I really prefer leaving punctuation outside the link, but it's less of an aesthetic preference and more frustration with some bad editors I've used where I have trouble ending link text. Leaving punctuation outside the link "seals" it and keeps things from "leaking".
posted by Karmakaze at 10:48 AM on March 10, 2011


I agree with phunniemee, cortex, etc.

More troubling to me is how to deal with punctuation when you want to include a full URL in the middle of a sentence in a plain-text context.
Hey guys, check out http://www.example.com/page.html!
It's mostly fine if it's as simple as that, but then oftentimes that'll get parsed by an auto-linkifier and then the URL is borked. But leaving a space between the URL and punctuation looks supremely ugly.

What do y'all do? Hope me Metafilter!
posted by kmz at 10:50 AM on March 10, 2011


Pugs are sad freakish twisted mutants. So are Persian cats.

And I agree with Rhaomi's link punctuation guidelines.
posted by BitterOldPunk at 10:52 AM on March 10, 2011


Even leaving out the exclamation point, I feel like there should be a period at the end. But putting it on a separate line and excluding punctuation altogether is what I resort to most of the time. Either that or try to reword so the link is in the middle of a sentence and doesn't need any punctuation around it, but that can be difficult.

And yes, I know, I'm beanplating URL punctuation.
posted by kmz at 10:55 AM on March 10, 2011


I'm with cortex, on both the punctuation and the pugs.
posted by Faint of Butt at 10:59 AM on March 10, 2011




I'm an neither an editor nor disinterested, but the only point I want to make is:

LINKS SHOULD NEVER CONSIST OF ONLY PUNCTUATION.


.
posted by blue_beetle at 11:05 AM on March 10, 2011 [1 favorite]


I agree with Cortex's convention; I also think this is similar to the argument about whether punctuation (period, comma, question mark, etc) goes inside or outside of quotation marks when it is not part of the text being quoted— the difference is that with hyperlinks, we don't have traditions born of lead type to adhere to, and so we are free to adhere to the so-called “logical” style.
posted by hattifattener at 11:10 AM on March 10, 2011


Also, remember that not everybody has the same settings as you. Those of us that like our links underlined will see when you accidentally include trailing whitespace in your link (e.g. "click here for more info") and grumble under our breath.
posted by Rhomboid at 11:19 AM on March 10, 2011 [1 favorite]


When I have insomnia I go through MetaFilter 2002-2005 and correct all the little hyperlinked commas I see. Now you know.
posted by jessamyn (staff) at 11:19 AM on March 10, 2011 [30 favorites]


Oops, should have previewed. Make that "click here for more info".
posted by Rhomboid at 11:20 AM on March 10, 2011


This is almost, but not quite, as important as changing the hyphen to a minus.
posted by alby at 11:21 AM on March 10, 2011 [2 favorites]


The correct style is to give me candy and delicious little cakes. Just FYI. I'm not sure if this is in covered in your garden-variety stylebook so it may be more of a convention than anything else.
posted by FAMOUS MONSTER at 11:22 AM on March 10, 2011 [3 favorites]


May we please have a font thread next?

Also, I don't care because mistakenly including the comma or period or other fragmentary bit of punctuation is the least of my MeFi style sins.
posted by bearwife at 11:25 AM on March 10, 2011


The pedantry, it buuuuuuuurns...
posted by amro at 11:30 AM on March 10, 2011


I don't have a favorite font, but I do have a least-favorite font.
posted by santaslittlehelper at 11:37 AM on March 10, 2011


Edge cases where the terminal punctuation actually is intrinsic to the link text are uncommon enough that I can't think of the last time I had to deal with it.

You can use Yahoo! to surf the internet.
posted by John Cohen at 11:40 AM on March 10, 2011


If you're sending a plain-text email and want to write out a link, the correct way to do it is to surround it with angle brackets, e.g.: "Hey guys, check out <http://www.example.com/page.html>! Almost all email clients will parse out the url correctly if you do this.
posted by Frankieist at 11:41 AM on March 10, 2011 [2 favorites]


When I have insomnia I go through MetaFilter 2002-2005 and correct all the little hyperlinked commas I see.

REVISIONIST!
posted by contraption at 12:03 PM on March 10, 2011


I have no opinion on the matter, except to say never link to single characters.

Ok, I won't.
posted by dersins at 12:07 PM on March 10, 2011 [4 favorites]


I didn't even know you could do that.
posted by shakespeherian at 12:12 PM on March 10, 2011 [2 favorites]

The correct style is to give me candy and delicious little cakes. Just FYI. I'm not sure if this is in covered in your garden-variety stylebook so it may be more of a convention than anything else.
I looked in your profile but could not find your location, so I did not know where to send the candy. I had to give it to the other people in the office. Sorry.
posted by Karmakaze at 12:20 PM on March 10, 2011 [1 favorite]


Usually I am opposed to frivolous uses of metatalk from my little soapbox in Noonecaresistan.

However, this is a critical issue and I am pleased that it was addressed.

I will now return to complaining to people about the correct rules for using the grocery store and the importance of bookstore etiquette. We have a busy schedule every day here in Noonecaresistan!
posted by winna at 12:41 PM on March 10, 2011 [2 favorites]


Without really thinking about it much, I instinctively treated hyperlinks like quotes, & put the punctuation within them, following American English rules.

I agree with ORthey & Burhanistan that hyperlinked blocks of text are unpleasant to read.
posted by Pronoiac at 1:12 PM on March 10, 2011


Pugs are sad freakish twisted mutants.

That is precisely why they kick ass.
posted by twirlip at 1:14 PM on March 10, 2011 [1 favorite]


I write and edit using hyperlinks and follow what Cortex said. And the only reason I've linked to entire blocks of text, Burhanistan, is because I thought that was convention on the blue seeing as how homunculous does it.
posted by infini at 1:48 PM on March 10, 2011


when you accidentally include trailing whitespace in your link
This annoys me far more than it should.

Terminating punctuation should never be included in the link, even if the whole line is the link text, IMO. Following the principle of not linking large blocks of text in the first place, which I violently agree with, the whole line shouldn't be linked in the first place! Placing a semi-easter egg in text by only linking the terminating punctuation is cool, tough.
posted by dg at 2:26 PM on March 10, 2011


As long as you aren't encouraging people to click here I really don't care. But "CLICK HERE" messages make me apeshitcrazy.

I did check and see if Jakob Neilsen had anything to say on the topic. It looks like he agrees with cortex' rules for his own use but he hasn't written up a guide.

Is that right? "Cortex'"? Or is it "cortex's"?
posted by NoraReed at 2:42 PM on March 10, 2011


The grammer, it burns. Me.
posted by emelenjr at 3:01 PM on March 10, 2011


Pugs don't kick ass. Pugs destroy sleep and any notion of quiet.

/sleepless spouse of pug owner
posted by nevercalm at 3:48 PM on March 10, 2011


I came in here to have an opinion but it looks like the "correct style"1 is already well-defended, so...kudos.

1"Correctness" and "style" are mostly orthogonal, so this phrase doesn't technically make sense.
posted by DU at 5:20 PM on March 10, 2011


>>When I have insomnia I go through MetaFilter 2002-2005 and correct all the little hyperlinked commas I see. Now you know.

The author of my various shadow accounts from that era is kind of offended.
posted by J. Wilson at 5:34 PM on March 10, 2011


>>Is that right? "Cortex'"? Or is it "cortex's"?

's for sure
posted by J. Wilson at 5:36 PM on March 10, 2011


I normally leave the punctuation outside the linked text, as seems to be the general view here. This also means you can occasionally go for the opposite effect, linking only the full stop to act like a footnote in case anyone's interested in the source of your quote/comment but not making the linkage the focal point (and indeed probably going unnoticed unless someone's interest is genuinely piqued).
posted by Abiezer at 6:24 PM on March 10, 2011


But really, what is a link? Is it the word that contains the link, or what the word signifies, or what the word links to?
posted by not_on_display at 7:37 PM on March 10, 2011


The way I do it is correct.
posted by joeclark at 10:02 PM on March 10, 2011


.

Huh, you know what's interesting, is the title attribute from that link shows up on the "Post Comment" and "Preview" buttons now.
posted by girih knot at 10:46 PM on March 10, 2011


Pugs are sad freakish twisted mutants. So are Persian cats.
I will fight you.








Right after the cat finishes napping on my chest. Priorities matter.
posted by arcticseal at 7:25 AM on March 11, 2011


According to no less an authority than Tim Berners-Lee, you should NEVER include the punctuation in the link.

Oops.
posted by Mngo at 11:28 AM on March 11, 2011


Pshaw. What does that guy know about the web?
posted by dersins at 1:25 PM on March 11, 2011


I agree that you shouldn't include the punctuation, but I think an exception is when it is to a youtube video. If you don't include the punctuation, then it gets stranded with that Play button in between and looks out of place.
posted by Deflagro at 2:52 PM on March 11, 2011 [1 favorite]


Jessamyn: When I have insomnia I go through MetaFilter 2002-2005 and correct all the little hyperlinked commas I see. Now you know.

There is something poetic anc moving about that. It's like your metafilter's Holden Caufield catching body's coming through the rye...

snif.
posted by Skygazer at 11:56 PM on March 11, 2011


If you're a blind person navigating a web page through a screenreader then various modes/programs will present the web page as a set of nodes - discrete chunks, individually-voiced or communicated via Braille.

For example:

I like <a href="http://www.example.com">this</a>, it's really <a href="http://www.example.com">neat</a>. What do you think?

may become
I like

this

, it's really

neat

. What do you think?
Including punctuation reads better - both in terms of making sense of snippets and in reading with synthesised speech, which needs all the punctuation help it can get. Where did the sentence before "What do you think?" end? Will searching for "neat," find the text you want?

For this reason I try to include punctuation WITHIN links:

I like <a href="http://www.example.com">this,</a> it's really <a href="http://www.example.com">neat.</a> What do you think?

which becomes

I like

this,

it's really

neat.

What do you think?

posted by alasdair at 4:25 PM on March 13, 2011 [6 favorites]


That's a much more compelling reason than anything else I've seen in this thread, alasdair. I've always done it the other way for aesthetic reasons, but I'm gonna change my ways as a result of your comment. Thanks!
posted by contraption at 3:23 PM on March 14, 2011 [2 favorites]


Thanks for educating me, Alasdair. I'll talk to Tim and I'm sure he'll change his mind, too.
posted by Mngo at 8:02 AM on March 15, 2011


I asked this question somewhere on Usenet ten years ago in the context of accessible design for the disabled, and the advice was overwhelmingly to exclude punctuation from link text because it confused text-to-speech software to do otherwise -- so the opposite of what alisdair said.

The only definitive way to resolve this is to blindfold Tim Berners-Lee and ask him again.
posted by FLAG (BASTARD WATER.) (Acorus Adulterinus.) at 5:30 PM on March 18, 2011 [2 favorites]


« Older Here Comes the Son   |   A wild meffy appears! Newer »

You are not logged in, either login or create an account to post comments