Tomando tu propio código:
Código:
<head>
<script type="text/javascript">
<!--
var pos=0;
var speed=25;
var msg="<pre>tesssssssssst</pre>";
function Type(){
pos++;
if (msg.substring(pos-1,pos) == " ") { pos++ }
text=msg.substring(0,pos);
document.getElementById('layerA').innerHTML = text;
if (pos < msg.length) { tmer=setTimeout('Type();',speed); }
}
//-->
</script>
<title>Pagina nueva 1</title>
</head>
<body text="#00FF00" bgcolor="#000000" onload="Type()" style="font-family: Courier New">
<div id="layerA" style='position:absolute;top:0px;left:0px;font-family:Courier New;font-size:18px;color:#00ff00'></div>
</body>
</html>