il testo va in un nodo di testo ed appeso al link

var tx=document.createTextNode('testo');
a.appendChild(tx);