Question: What is the best way to write URLs in print?
Question: What is the best way to write URLs in print? Several readers wrote in to ask about how to specify URLs in print and email, asking specifically about the angle brackets we use around URLs and the trailing slashes that follow some URLs.
Answer: As with anything in print, publications often have different styles. Some remove the http:// part of a Web URL, others set the URL in a different color or typeface, and still others reference URLs within the text and include the URLs at the bottom of the page. Here’s our take on what’s necessary; keep in mind that there are no specific rules.
In our opinion, URLs should always include the "scheme," which is http for a Web URL, ftp for an FTP URL and news for a newsgroup URL. Without the scheme, the URL type can be ambiguous, which serves no one.
The angle brackets that we and many others use to surround the URL in plain text are recommended but not required by the URL specification in the Internet Draft written by the World Wide Web Consortium (W3C). The angle brackets serve to separate the URL from the text around it and to eliminate ambiguity that would stem from punctuation following the URL (would the punctuation be part of the URL or not?). We encourage the use of angle brackets around URLs.
Trailing slashes are a different issue. There are essentially two places where you might use a trailing slash – a URL that is just a domain name, as in <http://www.netbits.net/> and a URL that contains a domain name and a directory name, which tells the Web server to load the default page (usually called either index.html or default.html) for that directory, such as <http://www.tidbits.com/bookbits/>. (A third type of URL would point directly at a file, such as <http://www.netbits.net/list.html>, and a trailing slash would never be correct in such a URL.)
In URLs that include just a domain name, the trailing slash is optional. We prefer it for consistency with URLs that end in directory names; other publications ignore that issue. In URLs that end in a directory name, the trailing slash is required. However, many Web servers will handle such URLs (like <http://www.tidbits.com/bookbits>) correctly, although they may log an error when they fail to find a file by the specified name. The full RFC1738 (Request for Comment) for the URL specification is available at the URL below. [ACE]