The html ids are exposed as global variables in browser.
<span id="someid" class="clsname1 clsname2 clsname3"></span>
For the above html snippet, you can find a global variable called someid. Among many things, you can do the following to it, say, in your console.
>someid.id \\gives back someid
>someid.className \\gives list of classes as string
>someid.classList \\gives an array
However, it did not conflict with existing global variables such as location, navigator, etc when you create a DOM like
1) Is it okay to access them and use in your scripts?
2) Why does browsers expose them globally like this?
3) I think developers should be cautious using id names as variables in their programs as they might impact.