17th January 2023, 2:33 pm. I had the bright idea to ask the Badsender team members for their opinion on the use of the html target attribute with "_blank" value for links (
<a>) of an email. A good half hour of debate ensues on the crucial question of whether or not it is wise to open links in a new window. And as you can imagine, not everyone agrees. But we'll give you the results of our exciting investigation.
Why fill in the value
"_blank" to the attribute
"_blank" of the
target attribute tells the browser that it must open the link in a new window or tab. This can be useful for users, allowing them to keep the current page open while navigating to the link, without losing the context of the original page. Right.
This can also be used to provide a smoother user experience by allowing users to navigate between multiple pages without having to use the "back" button on their browser.
To do this, you will need to enter the following HTML code:
<a href="https://www.badsender.com/en/" target="_blank">Go to our website</a>
What are the arguments in favour of target="_blank" in an email?
- Marion Moillet says, and I quote, "that she doesn't like having to use the "Back" button at the top of her browser", so much so that she now uses "Ctrl + click" to open the link in a new tab. This shows how annoying this feature can be for some users. Others feel that the "back" navigation is not logical...
- It is not pleasant to leave our webmail or the email we are reading. We just want to continue reading the rest of the email, and open other tabs or windows easily next to it to check the links later.
target="_blank"would not be added automatically on all webmails.
- According to Jonathan Loriaux "
target="_blankwas useful, from memory, on Lotus Notes, which did nothing if the instruction was not present.
- A media (podcast, video) initiated by the user is being read. Leaving the page would stop it, so it is better to open the links in a new window to avoid this.
- On the web, it is recommended to use a
target="_blank"if the user is working on something on the page (for example a form, or a purchase process in progress...) that he would risk losing.
Why don't you have to put a target="_blank" on the links in an email?
1. For the user experience.
target="_blank"is a default behavior change: the default behaviour of a link is to open in the same page (as if the link had a
target="_self"). Although you may be used to links opening in a new tab or window, this is just a personal preference. This may not be the case for all users, who may be more comfortable with the default behaviour.
- Returning to the end of point 1 cited in the arguments in favour of
target="_blank"and this story about going backwards which is not logical: when you take a path, it is often necessary to go back to the starting point, in order not to get lost. No ?
- As for point 6: For email, it's a bit different, since forms are quite complex or very rarely implemented in an email. And that a purchase process directly in an emailing, except in AMP for email... It's complicated. Anyway... No offence, but I think it's safe to assume that the recipient is unlikely to fill in a form or "work" in the email.
- If you put
target="_blank"attribute, you give the user no choice in how to open the link. On the other hand, if you omit the
target="_blank"in your email, the user has two choices (and it is better to leave the user free to choose): Open the link in the same window, or open it in a new tab, either with :
- Ctrl+click. We can assume that users are now familiar enough with the web to know this trick.
- right click + "Open link in a new tab".
- by pressing the wheel in the middle of the mouse.
- Opening a new tab removes the ability to "go back", which I personally find very useful. (see point 9. https://www.nngroup.com/articles/top-10-mistakes-web-design/).
2. For an accessibility issue.
- Without any indication in the link, it can be very confusing if a new tab or window opens when you click on it. The A11y project reports that this is a common frustration of many users of assistive technology. And recommends communicating the behaviour of the link in a way that is obvious to all users. This will help people understand what will happen before they activate the link.
3. For an environmental issue.
- Reduce the weight of the HTML code. If there are a lot of links in the email,
target="_blank"can increase the weight of the HTML code.
- For resource reasons, of course! Having multiple tabs open in a browser also takes up more memory on your machine. Have you ever opened the task manager in Windows with 20 tabs open in Chrome?
4. For ethical and practical reasons.
- Is it really necessary to include target="_blank" in the HTML code of the email if most email solutions add it by themselves ? I ask the question!
- You may want to optimise your statistics by opening a new tab. This way, the user does not leave your email, you extend his consultation time... But it's ugly! If they really want to find your email, they will know how to go back to their email programme or webmail.
- We are told that users do not understand that they are leaving their email solution to go to a website. But he has clicked, has he not? So it is a choice on his part. Moreover, if we go in this direction, we can also imagine that, conversely, the user will not understand why a new window or a new tab appears when he has not asked for it, or why the page he is trying to access does not load...
We have decided not to add the
target="_blank" attribute to links in our HTML unless the content of the email justifies this choice, for example, a podcast is being listened to thanks to a podcast block in the email .
Remember then that if we override the default behaviour with a
target="_blank" in an email, it must then be specified in the text of the link, in the attribute
title of the link, or in the graphical rendering.
If it is a specific request from the customer:
The default behavior is for links to open normally. There are some reasons why we might want to break that behavior, and we can go over those, but for most links, we don’t. We don’t want to force our desires on users and potentially frustrate them for such a small thing. We want our users to feel good about us.Chris Coyier, css-tricks.com