How to get the entire document HTML as a string? May 17, 2022 by IT Nursery Is there a way in JS to get the entire HTML within the html tags, as a string? document.documentElement.?? 16 Answers 16