Please note that the newlines you see in the textContent are _not_ due to the tags, but to the literal newlines in the HTML source - that's why there's two newlines before and after the main text, rather than one. Element.textContent just blindly concatenates all the text nodes' contents, regardless of whether they would be visible on the page or not (i.e. it includes and tags), whereas innerText is the human-readable text you would see on the page, and is more akin to what you would get if you copy-pasted the text.
Please note that the newlines you see in the textContent are _not_ due to the tags, but to the literal newlines in the HTML source - that's why there's two newlines before and after the main text, rather than one. Element.textContent just blindly concatenates all the text nodes' contents, regardless of whether they would be visible on the page or not (i.e. it includes and tags), whereas innerText is the human-readable text you would see on the page, and is more akin to what you would get if you copy-pasted the text.
Nice😮😮
Thank you for this short useful video
This is really good but you should have shown entire HTML and CSS codes
Great explanation thank you!
amazing tutorial sir
Thank you for the video :) one question though, is there a difference between setting the three? Or do they all to the same thing
Thanks great video
Why inner HTML is capital letter
its a syntax of js
ok?