textContent – Javascript DOM



The ‘textContent’ property allows you to get and set the text content of a Node, or more commonly, an HTML Element. In this video we look at how we can use the ‘textContent’ property.

I also go over the difference between ‘innerHTML’ and ‘textContent’ as they are two closely related properties.

For your reference:
https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML

If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!

source

Leave a Reply

Your email address will not be published. Required fields are marked *