I tried to add an element with JScript code, I gave it href and title attributes... but the link is invisible on the page ( if I check through browsers elements, it highlights an empty space which says "a 0x17". What's wrong with it? What should I do, to make it visible?
const a = document.createElement('a');
const b = document.querySelector('body');
a.setAttribute("href", "https://en.wikipedia.org/wiki/Kola_Superdeep_Borehole")
a.setAttribute("title", "Blah-blah");
b.appendChild(a);
if I write a.textContent("...") it's visible, but it's just a text, not a link. When I gave it href attribute, it became invisible.