cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create blank target links in markdown to open url link in new tabs?

ArielHerrera
New Contributor II

I am using markdown to include links urls. I am using the below markdown syntax:

[link text](http://example.com) 

The issue is each time I click the linked text it opens the url in the same tab as the notebook. I want the url to open it in a new tab. The markdown syntax to open a new tab should be:

[link](url){:target="_blank"}

as per https://stackoverflow.com/questions/4425198/can-i-create-links-with-target-blank-in-markdown

However it does not work in databricks notebook. Is there another way to use markdown for creating new tabs for links or plans to support this in databricks?

1 ACCEPTED SOLUTION

Accepted Solutions

Anonymous
Not applicable

Hi @Ariel Herrera,

You can just put html anchor tag in databricks notebook cell. It will open a new tab when you click it.

Please try the example below. It works for me in databricks notebook.

%md <a href="https://google.com" target="_blank">google link</a>

0693f000007OrnMAAS

After you run the cell, it gives you a link which opens a new tab when you click it.

0693f000007OrnNAAS

Thanks.

Lei

View solution in original post

2 REPLIES 2

Anonymous
Not applicable

Hi @Ariel Herrera,

You can just put html anchor tag in databricks notebook cell. It will open a new tab when you click it.

Please try the example below. It works for me in databricks notebook.

%md <a href="https://google.com" target="_blank">google link</a>

0693f000007OrnMAAS

After you run the cell, it gives you a link which opens a new tab when you click it.

0693f000007OrnNAAS

Thanks.

Lei

i was looking to see if it was possible with markdown instead of using html, but this works thank you!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.