Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

HTML Link Open in a New Tab

icodeletion
icodeletion

HTML Link Open in a New Tab

Since when you use the <a> tag for links and you press on one, it will replace the webpage with where the link led you too.


I'm wondering is there a way to open the link in a new tab, so it doesn't replace the old tab?

@IcingHackz

2 years ago

Voters

Comments

TopNew
2
OldWizard209
OldWizard209

You can use the target attribute and set it to blank:

<p>Go to <a href="https://www.youtube.com/" target="_blank">YouTube</a>.</p>

This will open on a New Tab.

2 years ago
1
MasonBond1
MasonBond1

@OldWizard209
':insert unhappy face:'

8 months ago
1
KSUDEE
KSUDEE

button name

1 year ago
1
KSUDEE
KSUDEE

I said for button

1 year ago
1
KSUDEE
KSUDEE

@KSUDEE
I said for the button

1 year ago
1
LegendaryWolf
LegendaryWolf

I had the same question! ty

2 years ago
1
tussiez
tussiez

A Solution

<a href=" https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank">Click here for free robux</a>
2 years ago
1
SameeraMurthy
SameeraMurthy

The Solution

Use the target attribute to open links in a new tab.
Like this:

<a href="https://google.com" target="_blank">Click Here!</a>

Hope this helped

2 years ago
1
RYANTADIPARTHI
RYANTADIPARTHI

Solution

you have to use target. You can assign it to blank, and it opens it up.

<a href="SOMELINK" target="blank">Link</a>

like that.
That should work

2 years ago
Load more