Is there a proper way to typeset a URL?

garyw's picture

I've been given text to typeset for a bibliography and several of the entries end with a web address.

As an example, this is how the URL text has been supplied:

Bringhurst, Robert. The Elements of Typographic Style. Vancouver: Hartley and Marks, 1992, 1997. http://www.TypographicStyle.com/.

Considering the accuracy of this academic publication, is there any reason not to simplify the URL as:

Bringhurst, Robert. The Elements of Typographic Style. Vancouver: Hartley and Marks, 1992, 1997. www.typographicstyle.com

(All lowercase, remove "http://", remove the ending "/", remove the period.)

I also have several situations with text supplied as:
http://www.Typographic%20Style.com

Is it correct to replace the "%20" with a blank character space that it represents, or leave it as "www.typographic%20style.com" ?

JamesM's picture

I would ask the project's author/editor if they are using a particular style guide, and if they are then ask how that style guide says to treat URL citations.

I believe that most style guides call for the entire URL to be listed, with no punctuation after it, and in some cases the date that URL was accessed should also be listed prior to the URL. But in matters like this I always defer to the editor.

Frode Bo Helland's picture

Can URL’s contain spaces (or %20)? Be careful about removing and/or adding “www”, as some sites will not work without it and some sites will not work with it (ex: myblog.blogspot.com).

garyw's picture

It's the "http://" that I am most interested in omitting, not "www." Also using all lowercase.

The author has no idea and is looking for a recommendation. It looks and reads better without "http://", I just want to be sure it's okay to do so. I think I'll talk with someone at my library reference desk and get their input.

Frode Bo Helland's picture

All lowercase is ok.

Jens Kutilek's picture

No, it isn’t.

Jens Kutilek's picture

»URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.«

http://www.w3.org/TR/WD-html40-970708/htmlweb.html

*

I think omitting the »http://« isn't a problem unless there are also URLs with other protocols, e.g starting with »https://« or »ftp://«.

nina's picture

Regarding typesetting: IIRC at least in the German-speaking part of the world we have a convention that when a URL starts with «www.», it's OK to omit the standard «http://» protocol (because it will be sufficiently clear that [1] yes this is a URL and [2] that's where it starts, it can be entered into a browser like this); but if it starts with anything else, you should include the «http://» to make it clearer.

So:

Bringhurst, Robert. The Elements of Typographic Style. Vancouver: Hartley and Marks, 1992, 1997. www.typographicstyle.com

Bringhurst, Robert. The Elements of Typographic Style. Vancouver: Hartley and Marks, 1992, 1997. http://subdomain.typographicstyle.com

I agree with Jens though that if there are URLs nearby using any other protocols, it's probably best to always cite the «http://» so as to avoid ambiguity.

dtw's picture

And best to leave the "%20" in, rather than turning it back into a space.

Case should copy whatever the site actually uses. I'm sure I heard somewhere that URLs for sites hosted on Unix servers are case-sensitive, while those on Windows servers are case-insensitive, so you should preserve the case given, just to be on the safe side.

This has actually bitten our marketing dept. on the a** as they produced an advert with a subpage of our URL on it, and dropped it all to l/c. Several months later I spotted that the URL returned a 404 error when pasted into the browser ... but reinstating a non-obvious cap in the middle of it caused the page to load fine.

JamesM's picture

It may boil down to what exactly you mean by "is it okay?" From a functional standpoint, it's probably okay as long as none of the URLs begin with "https" or "ftp". But from a style standpoint, I think you'll find that the style guides say to spell it out in citations, to avoid any ambiguity.

garyw's picture

James, I guess the point of my original post is to ask what are these style guides on URLs that you mention ... and where do I find them?

Chris Dean's picture

The American Psychological Association publication guidelines say:

Author, A. A. (1997). Title of work. Location, Publisher. Retrieved from http://www.xxxxxx

Depending on what you are referencing (book, journal, presentation &c) the first portion will change, but for the most part, if there is a url, it ends with "Retrieved from..." case sensitive, include http://, and don't end it with a period.

And I agree with James. When in doubt, ask the editor/publiser/boss if they have a convention in place.

JamesM's picture

> what are these style guides on URLs that
> you mention ... and where do I find them?

Style guides are written guidelines on the preferred style to use in different writing situations. Most newspapers, magazines, and large organizations pick a style guide to use (or create their own).

Some common ones are the Associated Press Style Book, the Chicago Manual of Style, the New York Times Manual of Style and Usage, and many others. For medical-related writing the AMA Style Guide is often used. You mentioned it's an academic project and perhaps there's a style guide preferred by your university.

Go to Amazon and search for "style guide for writing" and you'll find some, and your library will undoubtedly have some. Perhaps some are posted online, too.

forrest's picture

Domain names (including top level domains) are not case sensitive.

Everything else in URLs on Unix/Linux machines is generally case sensitive.

If academic writing you have to follow the appropriate standard (APA, MLA, etc).

This is a good guide to APA
http://owl.english.purdue.edu/owl/resource/560/01/

In terms of type, I sometimes use loose tracking for URLs.

johndberry's picture

For academic publications, yes, check with the editor. But if you're not having to follow a required style, I suggest deleting the "http://" (except in the situations already noted); I also suggest setting the URL in italics, to set it off clearly from the surrounding text. This is not a style that I've heard anyone else recommend; it's one that I've developed myself as a practical solution to designing and typesetting books. (It does depend on the typeface, of course; it calls for a good readable italic.)

John

kentlew's picture

John — I’ve also taken to setting URLs in italic, when feasible, to separate them from surrounding text. As you say, it’s a practical aid.

eliason's picture

In many cases I'd suppose the narrower letters of italic help with the breaking issues, too.

Chris Dean's picture

@ John and Kent: In academic publications specifically, would not italicizing urls interfere with visual search when scanning the references due to the fact that book titles or journal names use the same typographic cue?

Personally, I would consider italic urls to be a typographic heirarchy that is incongruent with the informational hierarchy resulting in increased time and decreased accuracy when searching for specific information in a references section.

This would actually make an interesting (and easily testable) experiment.

neverblink's picture

I've never really figured out how to hyphenate an URL correctly. Would you use an hyphenation-mark as it could be misinterpreted as part of the URL?

Chris Dean's picture

@neverblinke: While it may create an uneven rag, the only logical conclusion to avoid the hyphen to be misinterpreted as part of the url would be to set it on it's own line. Even then, it may be to long. In an electronic context, auto-detection should take care of it, in print I guess readers would have to go trial and error. An interesting point for consideration. Alternatives may include condensed typefaces, smaller point size or reduced inter-letter spacing.

Cristobal Henestrosa's picture

> Alternatives may include condensed typefaces, smaller point size or reduced inter-letter spacing.

And what about just forgetting the hyphen and continue the URL on the next line?

Jens Kutilek's picture

And what about just forgetting the hyphen and continue the URL on the next line?

IIRC, that’s what the German computer magazine c’t does.

Frode Bo Helland's picture

I stand corrected, and I’m glad I do. It’s always interesting to learn new stuff. I often use footnotes for URL’s, and if I suspect very long ones I try to leave space for that. If you need to hyphenate, perhaps moving the hyphen down one line works better?

mywebsite.com/my
-sub-section/

instead of
mywebsite.com/my-
sub-section/

This brings up another argument. Many designers think underlines are bad in print, but I happen to think nothing signals a hyperlink better.

riccard0's picture

Cristobal: And what about just forgetting the hyphen and continue the URL on the next line?
That’s the default behaviour of InDesign.

Frode: Many designers think underlines are bad in print, but I happen to think nothing signals a hyperlink better.
I tried, but my descenders weren’t happy! ;-) (I’m talking black & white)

I often need to place URIs in notes and bibliographies (http://www.typophile.com/node/74680) and I have even considered to put up an URL shortening service just for it!
Two notes: it would be nice if http://www.example.com/ could be shortened to example.com, but too many websites haven’t even configured the www-less domain.
About italics, it’s tempting, but, as Christopher rightly points out, it didn’t work in references. My first instinct would be setting them in a monospaced font, but they would end up even longer! Maybe, with the right superfamily, they could be set in a light sans if the remaining text is set in a serif face.

Cristobal Henestrosa's picture

Many designers think underlines are bad in print, but I happen to think nothing signals a hyperlink better.

But what happens if the URL includes an underscore?

JamesM's picture

I don't think URLs should be hyphenated, as the reader might think the hyphen is part of the URL.

It's often possible to keep a URL on line line if you tinker with the paragraph's line breaks or tighten the tracking a tad. But if breaking it is the only option, I break without a hyphen.

Incidentally, in InDesign I always apply the "no break" attribute to URLs. There are several ways to apply this attribute, but the method I use is to create a character style called "URL", set the style's attributes to include "no break", and then I apply that style to every URL.

johndberry's picture

The point is to make the URLs immediately recognizable as URLs, as well as to make them easily readable (since there is no live link; we're talking about print only, here), without ruining the typographic design and turning the whole page into a mess. That's one reason for shortening by eliminating the unnecessary "http://"; it's also an argument against tightening the tracking (always a bad idea anyway). And it might be an argument for avoiding justified setting in any text that's going to include URLs.

I like italic precisely because it sets off the URL in much the same way it would set off a title; functionally, they are very much alike, within a run of text. (If you've got a lot of URLs in long text, you might want to use a typeface like FF Quadraat that has a particularly narrow yet readable italic.)

A bunch of "http://"'s on a page are just visual noise, which gets in the way of both scanning and reading. Keep it simple, without losing meaning.

John

dtw's picture

re: breaking across line ends - the instructions I've given our typesetters, for URLs in references, are:

  1. Don't introduce hyphens;
  2. Try not to break at a hyphen that is actually part of the address, lest it look like you've introduced it;
  3. Break after a slash, underscore, question mark, or escaped character code (such as "%20"), or before a period (carrying the period over to the next line is sufficiently different-looking from normal sentence punctuation to make it perfectly clear the period is not signalling the end of the sentence/reference)
  4. If necessary, where a URL consists of words mashed together (thisisanexample.com) then break between those words.
eliason's picture

Does anybody put links in brackets, such as < and >? One issue I've faced is how to put a period at the end of a sentence that ends with a web address, without implying that the period is part of the address. Brackets solve that problem.

forrest's picture

In body text, the extra spacing is good - even letterspacing and/or a monospaced font or different font.

The logic of italics is good but the flavor does not seem right to me - too informal.

Absolutely no underlining - that not only looks bad but obscures any underscores in the URL. Absolutely no introduced hyphens.

Brackets is a nice idea and I've seen it done well.

Frode Bo Helland's picture

Riccardo: If you add a thin white stroke, descenders are no problem. An underline could easily lie below any underscores, and possible be coloured.

joeclark's picture

You can’t put a space in a the domain name you are discussing. %20 is an encoded space and is an error. Remove it and don’t look back.

Those same domain names are case-insensitive; hostnames like blog. or m. or even www. are not necessarily case insensitive but almost always are. You do not have to act as though [single word].[top-level-domain] is ever case-sensitive despite what you are being told here.

You may nonetheless wish to use the capitalization in your example to improve readability.

In print you have no reason to include the protocol identifier http://, but if the text you are using will at any time be exported to an E-book, you trigger the problem of producing an URL that isn’t usable online because you took the protocol identifier out. You can fix this manually, as I have done, but it’s an extra step.

Eliason, less-than and greater-than are not “brackets”; there is no reason to delimit an URL in plain text unless some statistically improbable character immediately follows it, like maybe a plain hyphen-minus.

Monospaced font (not Courier) can be nice for URLs in print.

You could just do what I have done and call it a day, since my way is correct. I can send you examples.

quadibloc's picture

It's true that Letter Gothic is a nice typeface for an URL in print, but then emphasizing an URL by the use of an ordinary sans-serif typeface is also a possibility. Of course, in that case (unless you have Bell Gothic available!) there could be ambiguities in distinguishing some characters.

Frode Bo Helland's picture

Reviving this old thread with a question: Is it OK to use a service like Tiny URL to shorten a url in a bibliography? My instinct says they service might not stay up for all eternity (although that is also true for the website).

kthomps5's picture

Editorial style--and your well-placed instinct--would dictate giving the full citation.

riccard0's picture

Frode, I think it’s a sensible solution in several cases, and one I have already adopted in many occasions.
The problem with the ephemeral (or, better, ever-changing) nature of all things internet remains, of course, and it could be wise to add a “retrieved on [date]” specification.
One thing I did (for a journal on welfare and social sciences) was to register a specific domain name for the purpose, in order to give the link a somewhat more “official” and also more friendly and less nerdy appearance (for the moment it’s backed by bit.ly, which offer a series of nice options, but there are php libraries to set up your own).
Otherwise, for longevity and familiarity I would probably use goo.gl
On a last note, I try whenever possible or applicable to substitute “http://” with “www.”, in order to both reduce clutter, and let Adobe Reader recognise them as links.

JamesM's picture

Copywriters I've worked with don't permit URL-shortening services in citations. Their links may not work indefinitely, plus the actual URL shows the source immediately. And I agree with Riccardo that a retrieval date is a good idea.

> although that is also true for the website

Yes but the original page could probably be found through the Internet Archive (https://archive.org) even if the site is no longer online, as long as you have the original URL.

Frode Bo Helland's picture

How about the name of the article, the domain name, and a shortened URL in parentheses?

riccard0's picture

Good compromise, since there are URLs that aren’t reasonably printable.

JamesM's picture

> name of the article, the domain name

The problem with that method is that it's sometimes hard to find an old article via search, or a search may bring up a long list of articles.

Why don't you want to use full URLs? I can understand not wanting to use one in the middle of a paragraph, but they are appropriate in a bibliography. You're going to annoy readers who want to check your references.

riccard0's picture

For one, in my experience, there are URLs, especially in bibliographies, which have no way to be displayed in a decent way (mostly because they’re too long for any given line length), and, second, related to that, bibliographies are meant to be perused by humans: would you rater type in your browser something like “This Is The Title example.com” or something like “https://ww2.docs.example.com/archive/2012/59/dir/B/˜JDoe/publications.php?&ID=356&Date=20120317&Display=PDF&Title=This%20Is%20The%20Title”?
Keeping in mind that many people don’t really knew the difference between the location bar and the search bar, even before they were merged in todays browser, let alone that anything other than the domain name is case sensitive.

Frode Bo Helland's picture

Yes, the URL in question is long and full of characters not easily acessible from a computer keyboard. Also, APA and McGill suggest just listing article title and domain name (and retrieval date).

JamesM's picture

I don't like long URLs either, and agree they can be difficult to retype. I'm just saying that copywriters I've worked with say you need to give the full URL.

Style guides sometimes disagree, but if the APA or McGill guide is appropriate for your paper, then follow their advice.

> .php?&ID=356&Date=20120317&Display=

Characters that come after ".php" or ".html" can often be deleted from the URL and it'll still work. You should always test first, of course.

For example, the CNN article:
http://www.cnn.com/2014/08/12/health/ebola-outbreak/index.html?hpt=hp_t2
can be shortened to:
http://www.cnn.com/2014/08/12/health/ebola-outbreak/index.html

riccard0's picture

Believe me, I shave off all I can! ;)
(you can also get rid of /index.html, for example)

JamesM's picture

Another option if you're concerned about someone typing long URLs is to also include a QR Code.

I've never been a fan of how they look, but anyone with a smart phone with a QR app can snap a picture of it and be taken directly to the proper web page. And there are free QR generators on the web.

But one concern is that maybe 10 years from now they'll be replaced by something else, so in a bibliography I'd still include the original URL.

riccard0's picture

A bit obtrusive, don’t you think? ;)

JamesM's picture

It can be a lot smaller, but I agree Ricccardo, I don't like the appearance.

But they work, and can be an alternative to a URL that people would have trouble typing.

I'm seeing them more and more on signage, in advertising, even on business cards (usually on the back).

white055's picture

Just joined the community and really enjoying it, I call a nice co-incidence. This is yet another piece of information I was searching around the web and in other communities.

Syndicate content Syndicate content