---
title: "Hyperlink"
language: "en"
type: "Symbol"
summary: "Hyperlink[uri] represents a hyperlink that jumps to the specified URI when clicked. Hyperlink[label, uri] represents a hyperlink to be displayed as label."
keywords: 
- HREF
- hyperlink button
- hyper-reference
- hypertext
- link class
- link destination
- link id
- link label
- link target
- link title
- link to page
- link to web
- URI
- URL
- hyperlink
- web
canonical_url: "https://reference.wolfram.com/language/ref/Hyperlink.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Notebook Document Generation"
    link: "https://reference.wolfram.com/language/guide/DocumentGeneration.en.md"
  - 
    title: "Control Objects"
    link: "https://reference.wolfram.com/language/guide/ControlObjects.en.md"
  - 
    title: "Creating Web Pages"
    link: "https://reference.wolfram.com/language/guide/CreatingWebPages.en.md"
  - 
    title: "URL Manipulation"
    link: "https://reference.wolfram.com/language/guide/URLManipulation.en.md"
  - 
    title: "Web Operations"
    link: "https://reference.wolfram.com/language/guide/WebOperations.en.md"
  - 
    title: "Graph Visualization"
    link: "https://reference.wolfram.com/language/guide/GraphVisualization.en.md"
  - 
    title: "Chart Labeling, Legending & Annotation"
    link: "https://reference.wolfram.com/language/guide/ChartLabelingLegendingAndAnnotation.en.md"
  - 
    title: "Notebook Formatting & Styling"
    link: "https://reference.wolfram.com/language/guide/NotebookFormattingAndStyling.en.md"
  - 
    title: "Graph Styling, Labeling, and Layout"
    link: "https://reference.wolfram.com/language/guide/GraphStylingAndLabeling.en.md"
  - 
    title: "Dynamic Graphics Elements"
    link: "https://reference.wolfram.com/language/guide/DynamicGraphicsElements.en.md"
related_workflows: 
  - 
    title: "Insert a Hyperlink"
    link: "https://reference.wolfram.com/language/workflow/InsertAHyperlink.en.md"
  - 
    title: "Set Up a Web Gallery"
    link: "https://reference.wolfram.com/language/workflow/SetUpAWebGallery.en.md"
related_tutorials: 
  - 
    title: "Setting Up Hyperlinks"
    link: "https://reference.wolfram.com/language/tutorial/InputAndOutputInNotebooks.en.md#9578"
---
# Hyperlink

Hyperlink[uri] represents a hyperlink that jumps to the specified URI when clicked. 

Hyperlink[label, uri] represents a hyperlink to be displayed as label.

## Details and Options

* The following forms of URIs can be used:

|                    |                                                                |
| ------------------ | -------------------------------------------------------------- |
| "string"           | a URI such as "http://www.wolfram.com"                         |
| URL["url"]         | an explicit URL                                                |
| File["filepath"]   | a local notebook file                                          |
| {"file.nb", None}  | a complete local notebook file                                 |
| {"file.nb", "tag"} | the first cell with the specified tag in a local notebook file |

* Local notebook files can be specified by relative paths such as ``"../file.nb"``. The base of the paths is taken to be the location of the notebook that contains the hyperlink.

* ``Hyperlink`` can be used with graphics or any other expression.

* ``Hyperlink`` objects can appear within graphics.

* By default, ``Hyperlink`` renders ``label`` in ``"Hyperlink"`` style.

* When the mouse is over ``label``, it is by default rendered in ``"HyperlinkActive"`` style.

* The following options can be given:

|                  |                   |                                               |
| ---------------- | ----------------- | --------------------------------------------- |
| ActiveStyle      | "HyperlinkActive" | style to add when hovering over the hyperlink |
| BaseStyle        | "Hyperlink"       | base styles for the hyperlink                 |
| HyperlinkAction  | "New"             | action to take when following the hyperlink   |

* Supported URI types include "http", "file", "ftp", and "mailto".

* URIs that begin with "paclet:" directly access Wolfram System documentation and other resources.

* Hyperlinks of different types are handled as follows:

|                       |                                        |
| --------------------- | -------------------------------------- |
| notebook file URI     | open in current Wolfram System session |
| non-notebook file URI | open through operating system          |
| non-file URI          | open in a web browser                  |

* In a standard notebook front end, hyperlinks can be inserted using the [`Hyperlink`](https://reference.wolfram.com/language/ref/menuitem/Hyperlink.en.md) item in the [`Insert`](https://reference.wolfram.com/language/guide/InsertMenu.en.md) menu.

* shift clicking a hyperlink will always open a new notebook window, even if an existing window could have been used.

* In a cloud notebook, ``Hyperlink`` with a target outside that notebook will open a new browser window or tab by default. The option ``HyperlinkAction -> "Recycled"`` may be given to reuse the existing view.

---

## Examples (17)

### Basic Examples (2)

```wl
In[1]:= Hyperlink["Wolfram Research, Inc.", "http://www.wolfram.com"]

Out[1]= ["Wolfram Research, Inc."](http://www.wolfram.com)
```

---

Create a link to the documentation:

```wl
In[1]:= Hyperlink["Plot", "paclet:ref/Plot"]

Out[1]= [`"Plot"`](https://reference.wolfram.com/language/ref/Plot.en.md)
```

### Scope (3)

Use ``Style`` and other functions to change the appearance of the link:

```wl
In[1]:= Hyperlink[Framed[Style["xxx", {Bold, Larger}]], None]

Out[1]= **"xxx"**
```

---

The label can be any expression:

```wl
In[1]:= Hyperlink[Plot[x Sin[1 / x], {x, -.4, .4}], None]

Out[1]= [image]
```

---

Convert a ``URL`` object to a link:

```wl
In[1]:= Hyperlink[URL["http://www.wolframalpha.com"]]

Out[1]= ["http://www.wolframalpha.com"](http://www.wolframalpha.com)
```

### Options (10)

#### ActiveStyle (1)

Specify the style when the mouse is over the hyperlink:

```wl
In[1]:= Hyperlink["xxx", None, ActiveStyle -> Green]

Out[1]= "xxx"
```

Show no change in style:

```wl
In[2]:= Hyperlink["xxx", None, ActiveStyle -> None]

Out[2]= "xxx"
```

#### Alignment (1)

Change the alignment within the link:

```wl
In[1]:= Grid[Table[Hyperlink["xxx", None, ImageSize -> {100, 40}, Alignment -> {w, h}], {h, {Top, Center, Bottom}}, {w, {Left, Center, Right}}]]

Out[1]=
|       |       |       |
| ----- | ----- | ----- |
| "xxx" | "xxx" | "xxx" |
| "xxx" | "xxx" | "xxx" |
| "xxx" | "xxx" | "xxx" |
```

#### Appearance (1)

Predefined hyperlink appearances:

```wl
In[1]:= Table[Hyperlink["xxx", Null, ImageSize -> {40, 10}, Appearance -> a], {a, {"DialogBox", "Palette", "Frameless"}}]

Out[1]= {"xxx", "xxx", "xxx"}
```

The same appearances when the hyperlink is clicked:

```wl
In[2]:= Table[Hyperlink["xxx", Null, ImageSize -> {40, 10}, Appearance -> {a, "Pressed"}], {a, {"DialogBox", "Palette", "Frameless"}}]

Out[2]= {"xxx", "xxx", "xxx"}
```

#### Background (1)

Change the background color:

```wl
In[1]:= Table[Hyperlink["xxx", None, ImageSize -> {100, 40}, Background -> c], {c, {LightBlue, Purple, Gray, Pink}}]

Out[1]= {"xxx", "xxx", "xxx", "xxx"}
```

#### BaselinePosition (1)

Align the link with surrounding text:

```wl
In[1]:= Row[Table[Hyperlink["aaa", None, ImageSize -> {100, 40}, BaselinePosition -> p], {p, {Top, Center, Bottom}}], "xxx"]

Out[1]=
Row[{Hyperlink["aaa", None, ImageSize -> {100, 40}, BaselinePosition -> Top], 
  Hyperlink["aaa", None, ImageSize -> {100, 40}, BaselinePosition -> Center], 
  Hyperlink["aaa", None, ImageSize -> {100, 40}, BaselinePosition -> Bottom]}, "xxx"]
```

#### Enabled (1)

By setting ``Enabled -> False``, disable a link:

```wl
In[1]:= Table[Hyperlink["xxx", None, ImageSize -> {100, 40}, Enabled -> e], {e, {True, False}}]

Out[1]= {"xxx", "xxx"}
```

#### FrameMargins (1)

Add margins within the clickable area:

```wl
In[1]:= Table[Hyperlink["xxx", Null, FrameMargins -> m], {m, {0, 5, 10, 20}}]

Out[1]= {"xxx", "xxx", "xxx", "xxx"}
```

#### ImageMargins (1)

Add margins outside of the hyperlink:

```wl
In[1]:= Table[Framed@Hyperlink["xxx", Null, FrameMargins -> 0, ImageMargins -> m], {m, {0, 5, 10, 20}}]

Out[1]= {"xxx", "xxx", "xxx", "xxx"}
```

#### ImageSize (1)

Change the overall size:

```wl
In[1]:= Grid[Table[Hyperlink["xxx", None, ImageSize -> {w, h}], {h, {20, 30, 50}}, {w, {40, 70, 120}}]]

Out[1]=
|       |       |       |
| ----- | ----- | ----- |
| "xxx" | "xxx" | "xxx" |
| "xxx" | "xxx" | "xxx" |
| "xxx" | "xxx" | "xxx" |
```

#### HyperlinkAction (1)

Create a link that recycles the current cloud notebook view:

```wl
In[1]:= Hyperlink["http://www.wolfram.com", HyperlinkAction -> "Recycled"]

Out[1]= [http://www.wolfram.com](http://www.wolfram.com)
```

### Applications (1)

Use hyperlinks on individual curves (click curve to activate):

```wl
In[1]:= Plot[{Hyperlink[Sin[x], "http://mathworld.wolfram.com/Sine.html"], Hyperlink[Cos[x], "http://mathworld.wolfram.com/Cosine.html"]}, {x, 0, 2Pi}]

Out[1]= [image]
```

### Properties & Relations (1)

Use ``StatusArea`` to change the message in the status area:

```wl
In[1]:= Hyperlink[StatusArea["Wolfram Research, Inc.", "Makers of Mathematica"], "http://www.wolfram.com"]

Out[1]= ["Wolfram Research, Inc."](http://www.wolfram.com)
```

## See Also

* [`Button`](https://reference.wolfram.com/language/ref/Button.en.md)
* [`FileNameSetter`](https://reference.wolfram.com/language/ref/FileNameSetter.en.md)
* [`StatusArea`](https://reference.wolfram.com/language/ref/StatusArea.en.md)
* [`Tooltip`](https://reference.wolfram.com/language/ref/Tooltip.en.md)
* [`PopupWindow`](https://reference.wolfram.com/language/ref/PopupWindow.en.md)
* [`NotebookLocate`](https://reference.wolfram.com/language/ref/NotebookLocate.en.md)
* [`URLEncode`](https://reference.wolfram.com/language/ref/URLEncode.en.md)
* [`URLBuild`](https://reference.wolfram.com/language/ref/URLBuild.en.md)
* [`NotebookImport`](https://reference.wolfram.com/language/ref/NotebookImport.en.md)
* [`GalleryView`](https://reference.wolfram.com/language/ref/GalleryView.en.md)
* [`HTML`](https://reference.wolfram.com/language/ref/format/HTML.en.md)

## Tech Notes

* [Setting Up Hyperlinks](https://reference.wolfram.com/language/tutorial/InputAndOutputInNotebooks.en.md#9578)

## Related Guides

* [Notebook Document Generation](https://reference.wolfram.com/language/guide/DocumentGeneration.en.md)
* [Control Objects](https://reference.wolfram.com/language/guide/ControlObjects.en.md)
* [Creating Web Pages](https://reference.wolfram.com/language/guide/CreatingWebPages.en.md)
* [URL Manipulation](https://reference.wolfram.com/language/guide/URLManipulation.en.md)
* [Web Operations](https://reference.wolfram.com/language/guide/WebOperations.en.md)
* [Graph Visualization](https://reference.wolfram.com/language/guide/GraphVisualization.en.md)
* [Chart Labeling, Legending & Annotation](https://reference.wolfram.com/language/guide/ChartLabelingLegendingAndAnnotation.en.md)
* [Notebook Formatting & Styling](https://reference.wolfram.com/language/guide/NotebookFormattingAndStyling.en.md)
* [Graph Styling, Labeling, and Layout](https://reference.wolfram.com/language/guide/GraphStylingAndLabeling.en.md)
* [Dynamic Graphics Elements](https://reference.wolfram.com/language/guide/DynamicGraphicsElements.en.md)

## Related Workflows

* [Insert a Hyperlink](https://reference.wolfram.com/language/workflow/InsertAHyperlink.en.md)
* [Set Up a Web Gallery](https://reference.wolfram.com/language/workflow/SetUpAWebGallery.en.md)

## History

* [Introduced in 2007 (6.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn60.en.md) \| [Updated in 2008 (7.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn70.en.md) ▪ [2020 (12.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn121.en.md)