- Because it doesn't have an ID set
- Because we can only access one element a time
- Because
h1
is not a valid element name <html>
<body>
<h1>The New York Times</h1>
<h2 id="basic">Basic subscription</h2>
<h2 id="device">
Unlimited reading on any device
</h2>
<script>
</script>
</body>
</html>]]>We can't access the h1
element because it doesn't have an ID set.