I am looking to open all content within a specific <div>
in a new tab (target="_blank"
).
I am open to any solution, whether it involves JS, CSS, HTML, classes, IDs, etc.
I experimented with using
<base target="_blank">
, but it affected everything universally rather than only a specific area.
For instance:
<a href="example.html"> <div> <base target="_blank"> [CONTENT] </div>
I expected "example.html" to open in the current tab, but its target was also set to "_blank"
.
I also attempted using
<div target="_blank">
, but it had no impact and was treated as a regular <div>
.