But avoid injecting script and manipulating the SharePoint page DOM, go for SPFX web part instead. This trick works with Scripts (Content Editor, Modern Script Editor) as well, remember that target="_blank" will not work unless you include data-interception="off". Try now, your SharePoint hyperlinks from Modern pages will open in new tab ?, respecting the target="_blank" attribute. In order to open link in a new tab, add the attribute data-interception="off" to your anchor tag. Use " data-interception" attribute that can be added to the HTML anchor tag to bypass the Page Router logic. ✔️ The hidden gem - "data-interception" attribute Same is the case with SharePoint Framework (spfx) web parts. It decides how the SharePoint page should be rendered and ignores the target attribute. SharePoint Online uses an inbuilt Page Router which is a mechanism used to render pages in SharePoint. ⚡️ Why does the target="_blank" not work? You may specify to open links in a new tab, but that will not work. Oops, what happened ? ? Why did that not work ? - The anchor tag ignores the target="_blank" attribute for internal links but works for external links. Use anchor tag with attribute target="_blank" which would open the hyperlink in a new window ?. ⚡️ Let us try the HTML way -> target="_blank" Read comment from the SharePoint Product team here - SharePoint User Voice Classic web parts like Content Editor, Script Editor.Modern web parts like Quick Links, Images, Hero, etc.On the contrary, external links do open in a new tab, say a link to Code2Care. SharePoint Modern links ⚡️ Why SharePoint Online links do not open in new tab ?īy design, SharePoint links open in the same tab in the modern pages (this could be a link to any site, document, page, or anything else within your SharePoint tenant).