What’s the DOM? #3

Browser console
innerHTML and InnerText
textContent

innerText

Browser window rendered text
h1 content altered by innerText
innerText rendered in the browser window

textContent

textContent returns the unrendered text

--

--

--

I am a web developer who writes web development content for you to make web development easier

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Creating Grafana Dashboards for Node.js Apps on Kubernetes

How to Get the First Two Characters of a String in JavaScript

Reduce() in Javascript ES6

Redux with React — Basics

Face recognition login using ReactJS And Computer Vision

Vue.js State Management with Vuex: A Beginner’s Guide

Unleashing the power of React Table Part 2

Javascript: Object

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmadullahnikzad

Ahmadullahnikzad

I am a web developer who writes web development content for you to make web development easier

More from Medium

Console.log tricks : How to style a log

Failure! JavaScript in wk 3 of SheCodes Plus

A JS code snippet which does not work properly

Converting Javascript Date objects to readable formats

I have never had the privilege to use dynamic imports until very recently when I used them to power…