Exemplo 2

Texto, texto, texto, texto...

alert(document.getElementById("titulo").innerHTML)