loader

HTML Link in A New Tab

Ugur Emirmustafa

Feb 19, 2021
–––
HtmlQuick Tips

Share

Nobody likes going back in the browser while they have opportunity to open the file in new tab. So how can we make our external links in our pages to be opened in a new tab automatically? Here is the solution: target property.

<a href='https://www.devugur.com' target='_blank' rel='noopener noreferrer'>This link will be opened in a new tab</a>
In order to block the target web page from malicious acts, we can use rel='noopener noreferrer' attribute also.

Source

More Posts

loader

Create Custom Social Share Buttons for React

Feb 17, 2021

–––
loader

Storing Data on Local Storage in a React Application

Apr 20, 2021

–––

Follow Me!

dev

ugur