≡ Menu

How to Get a Link To Open Up In a New Tab Using the target = “_blank” HTML Attribute

Did you know that you can add a snippet of code (HTML) to your hyperlink so it opens up in another tab?

Having your links open up in another tab will let users come back to them later without leaving the current page.

This will keep them on your website and provide them with a good user experience.

So here is what you do. Go to a WordPress post you have published in the past.

Switch to “Text” mode inside your WordPress editor and add the code target=”_blank” to the end of any URL you want to open up in another tab.

Here is a code example below.

Code Example:

<a href=”https://tyronneratcliff.com/” target=”_blank”>My blog’s home page will open in another tab.</a>

My blog’s home page will open in another tab.

The word “target” is the name of the HTML attribute and “_blank” is the target attribute’s value.

 

{ 0 comments… add one }

Leave a Comment