In particular why does document.getElementsById work here
add padding
document.getElementById("move") returns html element
document.getElementsByClassName("move") returns html collection
style
is a property of html element hence, works fine with getElementById
For reference -
https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById