Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

Why do I not see HTML tags in console output when using innerHTML or innerText? [duplicate]

$
0
0

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>

Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>