Understanding InDesign’s Hyperlink Formatting

Build interactivity into your InDesign documents with hyperlinks.

Hyperlinks are probably the most fundamental interactive feature you can build into your InDesign documents. In fact, they’re just about the only interactive feature that works across every kind of interactive document you can export from InDesign, including EPUB (fixed-layout and reflowable), PDF, and HTML. So with all these hyperlinks to deal with, it’s worth understanding how InDesign handles hyperlink formatting to save yourself some aggravation.

The Hyperlink Character Style and Swatch

In InDesign, a new character style called Hyperlink is created the moment you add the first hyperlink to a document. Strangely, this is true even if you choose not to use the style and even if the hyperlink is applied to an object and not to text. By default, the Hyperlink character style applies just a blue color and an underline.

InDesign character styles hyperlink

A new blue swatch used by the character style (and also called Hyperlink) is created as well.

InDesign swatches panel hyperlink

There is no way to turn off the automatic creation of the character style and swatch, but you are free to edit them, or delete them and replace them with another style and swatch.

Setting Default Hyperlink Formatting

In the New Hyperlink dialog box, there is a menu where you can choose to apply the Hyperlink style, another style, or no style to your new hyperlink. You can also create a new character style to use.

InDesign new hyperlink dialog box style

The choice you make here is “sticky,” meaning that it will apply to all new hyperlinks you create in the document until you change it in this dialog box (or delete the style and replace it with another or [None]). It will even apply across documents if you choose any style that exists in both documents, [None], or [Same style].

Changing the formatting of an existing hyperlink won’t affect the formatting that gets applied to new hyperlinks—even if you use the Edit Hyperlink dialog box, which looks identical to the New Hyperlink dialog box.

InDesign edit hyperlink new hyperlink style

And if you manually remove the character style applied to an existing hyperlink using the Control panel, the style will still be applied to the next hyperlink you make. Sticky indeed.

One Style Fits All… Except When It Doesn’t

The chosen character style applies itself to all types of new hyperlinks. This is unfortunate because it would be cool if, say, InDesign could remember that you always wanted hyperlinks to text anchors to be formatted with a different style than URLs. Alas, this is not the case.

On the other hand, hyperlinks that you wish would have consistent formatting may not. For example, there’s nothing to prevent shared destinations from having different styles applied to them.

Deleting a Hyperlink Doesn’t Delete Its Formatting

Keep in mind, if you decide to remove a hyperlink, the formatting stays. This can lead someone to think there’s a hyperlink where there isn’t.

InDesign remove selected hyperlinks

GREP Style Formatting is Overridden

You might think you could compensate for a lot of these quirks by creating a GREP style to override the formatting from the hyperlink dialog boxes. And you can—but only if you choose the [None] or [Same style] character style.

InDesign new hyperlink dialog box same style

Otherwise, the GREP style formatting will be overridden by the formatting from the chosen hyperlink style. For example, in the screenshot below, a GREP style made both URLs green until the second one was converted to a hyperlink.

InDesign green hyperlinks

Formatting Via Convert URLs to Hyperlinks

One other point worth mentioning is that the Convert URLs to Hyperlinks feature, while somewhat primitive (it thinks any text without spaces around a period is a URL), does give you the ability to create new hyperlinks at the document or story level and apply different character styles as you go, like a Find/Change.

InDesign Convert URLs to Hyperlinks dialog box

So while there’s definitely room for improvement in the way InDesign handles hyperlink formatting, at least now you know where that Hyperlink style and swatch came from and how to avoid them if you want to.

Bookmark
Please login to bookmark Close

This article was last modified on March 16, 2023

Comments (11)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...