So, in my specific case, I am trying to make all the <a>
elements in a particular div
have the attribute target = "_blank"
to open them in new tabs.
But this could work with any element and any attribute. I'm just wondering if there is a way to add these attributes with Javascript.
My first thought was to use CSS, but then I realized that this is not a style issue.