The quotation marks are ending your string. You can either:
a) Wrap the string in single quotes (you can place single quotes inside double quotes or vice versa and they will not end your string)
Code:
document.getElementById("text").innerHTML = 'lots of text<br><a href="linktonewpage">some text</a>';
b) Wrap the URL in single quotes (as xelawho suggested)
Code:
document.getElementById("text").innerHTML = "lots of text<br><a href='linktonewpage'>some text</a>";
c) Escape the quotation marks with a backslash
Code:
document.getElementById("text").innerHTML = "lots of text<br><a href=\"linktonewpage\">some text</a>";