Would like to be able to create links that open in a new tab

I understand there is no way to do this without modifying a theme which I do not have the skill to do.

You don’t need to modify a theme to create links that open in a new tab from your blog posts and pages. Here’s an example:

I found <a href="https://example.com/interesting-page" target="_blank">an interesting page</a> on the web.

But you might want to consider not doing the new tab thing. :blush: Forcing new tabs and windows on visitors is usually very frustrating for them, as it breaks the back button in some browsers. And people generally like control: they want to decide for themselves if and when to open a new tab.

To quote Dr. Nielsen (usability expert):

Since 1999, it’s been a firm web-usability guideline to refrain from opening new browser windows for several reasons. … For the most part, always open links in the same browser tab or window .

1 Like

Thank you for your very helpful reply. The article you sent opened my eyes. My rationale was when linking to another site it is better to open the link in a new tab to keep the visitor on my site. But I see that’s not a winning argument especially on mobile.

And thank you for the html. But is it doable using Markdown, just so I know? I won’t open in new tabs for my readers any longer.

Yes, the snippet I posted above is Markdown. It’s perfectly allowed to use HTML tags within your Markdown formatted posts.

If you mean if it’s doable using just Markdown syntax, no HTML allowed, then the answer is yes…maybe…sometimes. :blush: The thing is, Markdown is a very loosely defined markup language: there are a lot of different flavors and dialects. Some of them, like Kramdown, allows adding attributes in this way:

[an interesting page](https://example.com/interesting-page){:target="_blank"}

That won’t work in Micro.blog, though, which uses Goldmark as its default Markdown parser. But, few things are impossible in the digital realm. A developer could add support for a special syntax to allow creating Markdown links in Micro.blog that would open in new tabs.

But no, there’s no way out of the box to create links that open new tabs without relying on HTML.

Got it. That’s all good to know. You really have opened my eyes. I just wrote a blog post about it. Thank you for your generosity.

1 Like

I just added a link to my photography page to open in an external link. Thank you. That’s the only one I wanted to change now that you have educated me.

1 Like

@sod, thanks for the point about new windows and the Nielsen quote. I had no idea. Like @abc, I thought it was better to keep users on my site. :astonished:

1 Like