Consider the following html.
<div id="test" style="display:none"></div>
<script> console.log(document.getElementById("test").style.display) </script>
This results in none
in the console log. However, if instead:
<style> #test{ display: none; } </style>
<div id="test"></div>
<script> console.log(document.getElementById("test").style.display) </script>
then it fails to determine the display property. Why is that the case?