const p = document.querySelector("p"); console.log(p.innerHTML); /*first*/ <p>first</p> <p>second</p> <p>third</p> <p>fourth</p>