This question already has an answer here:
consoleOutputText = document.getElementById('phrase2').innerText
consoleOutputHTML = document.getElementById('phrase2').innerHTML
console.log(consoleOutputText)
console.log(consoleOutputHTML)
<p id='phrase2'>This **[<h3>statement</h3>][1]** <b>populates</b> in browser Console.</p>