Posted in html
159
6:20 am, August 31, 2018

make all links target new window

I was actually searching for a js way to do this, but i found this instead. Here is a really easy way to make all links target a _blank window. Just add this to your <head>.

<base target="_blank">

as a side note this can actually get annoying as you have to add target _self to make the link stay in the same window if you have _blank on all links, so i guess it depends if you have more links that you want external than you want to have.

<base target="_self">

here is the full usage for target

<a target="_blank|_self|_parent|_top|framename">

make all links target new window Demo

View Demo Full Screen View Demo New Tab

make all links target new window Code

Related Tags

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Items in html
using the kbd html tag twitter social sharing meta tags test image url that always changes unsplash placeholder set the amount of lines to show in a textarea field Scroll down indicator css javascript and html a page with two images Aligning Images in TinyMCE or Floating them left and right (code) test page for the custom css 12 grid used on this site easy twitter embed code Custom JS Tabs - No Jquery or Jquery UI scroll to top html css and js hide parts of a form until the 1st item is selected load a youtube video in a fancybox modal add google captcha to enable and disable a form button template for testing and live reloading html files toggle div function with chevron up down toggle Bootstrap Card Formatting HTML and CSS - Header and Footer Applied Accessibility - Tab Index Applied Accessibility - Access Keys Dropdown Box with Searchable Text meta keywords tag meta description tag favicon code meta tag foundation includes cdnjs Form elements New Zealand region list video embed no controls video embed tag video embed full screen all screen sizes del youtube embed iframe emoji data take full page screenshot screencapture using chrome dev tools flexbox layout template simple dropdown navigation ul li css responsive viewport meta tag youtube embed no controls auto play iframe make all links target new window lorem ipsum copy image to data uri using chrome base64 encode youtube extract thumbnail from video link using foundation 6.4 xy grid basics meta refresh reload page layout homepage random emojis copy and paste link to an external stylesheet form elements australian state list simple dropdown multi level navigation ul li css make any element editable
Related Search Terms