<html><body><h1>Soccer team ratings</h1><h2 id="winner">Liverpool</h2><p>This team has an overall rating of 7.01.</p><h2 id="loser">Lyon</h2><p>This team has an overall rating of 6.91.</p><script>var heading = document.getElementById("winner"); console.log(heading);</script></body> </html>]]>
Make sure to assemble .getElementById("winner") in your code.