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

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

Build a PWA with Next.js to achieve 100% lighthouse score

Noob’s intro to Algorithms 101

Simplification of constraining TypeScript’s type parameters to “ground” instantiations

How to setup CI/CD workflow for Node.js apps with Jenkins and Kubernetes

Voice Effects using Pizzicato.js with Agora RTC in a React JS App

JavaScript

How does browser work in 2019 (part 5) — optimization in the interaction stage

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

What knowledge is required to learn JavaScript?

What is the difference between ‘==’ and ‘===’? And why you need to know.

Day05 - #100DaysOfCode - Slow Weekend

Chrome Extension “New Tab” React Application In 3 Easy Steps