How to get the title of HTML page with JavaScript?

Use document.title:

console.log(document.title)
<title>Title test</title>

MDN Web Docs

Leave a Comment