Trying to make a lyrics site with a dark mode but the dark mode button just causes errors
I've tried finding solutions online but most of them say to move the script inside of the body tag but my script is already in the body
<DOCTYPE! html>
<html>
<head>
<title>Lyrics Page</title>
</head>
<style>
#bgr {
background-color: white;
}
#lyrics {
color:black;
}
#songtitle {
color: black;
text-align:center;
}
</style>
<body id=bgr>
<script>
function darkmode() {
document.getElementById("bgr").style.background-color = "black";
document.getElementById("songtitle").style.color = "grey";
document.getElementById("lyrics").style.color = "grey";
}
</script>
<button type="button" onclick="darkmode()">Dark Mode</button>
<h1 id=songtitle>song</h1>
<h2 id=songtitle>artist</h2>
<br>
<center id=lyrics>paragraph 1</center>
<br>
<center id=lyrics>paragraph 2</center>
<br>
<center id=lyrics>paragraph 3</center>
</body>
</html>