How to open link in new tab on html?

后端 未结 10 1897
孤独总比滥情好
孤独总比滥情好 2020-11-22 11:57

I\'m working on an HTML project, and I can\'t find out how to open a link in a new tab without javascript.

I already know that

10条回答
  •  抹茶落季
    2020-11-22 12:26

    You can use:

     Website
    

    However the above make your site vulnerable to phishing attacks. You can prevent it from happening in some browsers by adding rel="noopener noreferrer" to your link. With this added, the above example becomes:

    Website.com 
    

    check out for more information: https://www.thesitewizard.com/html-tutorial/open-links-in-new-window-or-tab.shtml

提交回复
热议问题