Why do people put angle brackets around <urls>

Quite frequently in non-HTML documents, such as E-mails, people will enclose their URLs in angle brackets, such as <http://foo.com> What is the origin of this? For me, it just makes cutting and pasting the URLs much harder (it’s easier if they have whitespace around them and easiest if they are on a line by themselves.) It’s not any kind of valid XML or HTML in fact it would cause a problem in any document of that sort.

There’s lot of software out there that parses URLs out of text documents of course, but they all seem to do fine with whitespace and other punctuation. They handle the angle bracket notation, but don’t need it. Is there any software out there that needs it? If not, why do so many people use this form?

Outlook doesn't line split <> wrapped URLs

You know the URL wrapping problem? One workaround for Outlook users (or those sending to them) has long been to enclose the URL in angle brackets. I suspect because of this some other MUAs now do the same thing. It's not an ideal solution, but it works a lot better than the browser "unwrap the URL" tools I've seen, partly because it means clicking the URL still works and partly because the MUA doesn't add the "=20" decorations.

RE: Outlook doesn't line split ...

Outlook also has major heartburn with intranet URIs, no matter how long they are. If you're stuck with "approved software only" on a workplace desktop, you kind of get used to dysfunctional, ugly syntax.

An old RFC sort of recommended this...

RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) sort of recommends this in passing. Another RFC (perhaps a draft of 2396) recommended a format of but I can't find any evidence of that online now.

Pre-HTML Markup

I remember in the Mac community in the late 80's (pre-web browser) that there were several text formats that were designed to be both readable, mailable in days of mailers messing with line lengths, and also machine parsable. Most notably in the Mac community was SEText, but there were quite a few others. There was even a SEText browser at one point, that would display this very humanly readable text format into a rich text format with section links, sort of a proto-RSS.

Use of the nomenclature was not actually part of the SEText standard, but the most popular user of SEText was Tidbits (which though first published in 1990 today would be considered a blog), and it was one the first I know of to use it in almost every issue in the early 90's when a lot of the links were to things like ftp:, wais: gopher:, etc.

To this day, I still find myself doing it in text emails.

Markdown

Many types of wiki-like markup use this format. In my case, it's a part of the Markdown syntax (Markdown is designed to be both easily-readible and easily-parseable into HTML): http://daringfireball.net/projects/markdown/syntax#autolink

I understand markdown

It, and several other data entry formats for wikis and blogs use special character syntax to define easier to write markup than HTML. I use markdown on this blog. But that's a format for data entry, to be turned into HTML by the very tool you are using, not a way to put a URL into a text document to give to other people as text.

Several mail programs used

Several mail programs used to add those automatically if you put a url on a line by itself, and there was no way to get it to stop doing it. Pissed me off no end.

Saving HTML web page as text in Firefox

I was just saving an HTML web page as text in Firefox, and discovered that it puts angle brackets around the links. So an html of link becomes "link <http://www.url.com>"

Angle brackets enable URLs to break across lines in email

Quite simply, enclosing long URLs that wrap across lines in angle brackets enables email clients to recognize the entire broken string as a single URL and to make it clickable. This has been true for a very long time, which is why TidBITS started adding angle brackets to all URLs (to do it for only long ones would be inconsistent) back in 1995. To this day, most email clients I'm aware of won't parse line-broken URLs properly unless they're wrapped in angle brackets.

http://db.tidbits.com/getbits.acgi?tbart=1571

As far as copying and pasting goes, the return character usually had to be removed manually, so it was generally considered easier to click a URL and open it in a Web browser for verification, then copy from the Web browser address field.

cheers... -Adam

W3C recommendation: wrappers for URIs in plain text

quoted from http://www.w3.org/Addressing/URL/5.1_Wrappers.html:


URIs, including URLs, will ideally be transmitted though protocols which accept them and data formats which define a context for them. However, in practice nowadays there are many occasions when URLs are included in plain ASCII non-marked-up text such as electronic mail and usenet news messages.

In this case, it is convenient to have a separate wrapper syntax to define delimiters which will enable the human or automated reader to recognize that the URI is a URI.

The recommendation is that the angle brackets (less than and greater than signs) of the ASCII set be used for this purpose.

These wrappers do not form part of the URL, are not mandatory, and should not be used in contexts (such as SGML parameters, HTTP requests, etc) in which delimiters are already specified.

In that case

It would be good for the browser’s URL paste code to strip these angle brackets, because they do make cut and paste a pain, and I guess I’m not yet running into much software that is making use of this recommendation.

re: browser URL paste code

Definitely. Also good would be for e-mail software, Web-based or otherwise, that creates hyperlinks out of URIs found in plain text messages, to *not* incdude the angle brackets in the link target.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

His name is Brad Templeton. You figure it out.
Please make up a name if you do not wish to give your real one.
The content of this field is kept private and will not be shown publicly.
Personal home pages only. Posts with biz home pages get deleted and search engines ignore all links
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options