<html>
<body>
<h1>HTML DOM Attributes</h1>
<h2>The attributes.item() Method </h2>
<div id="myDiv" style="background-color:red;width:100%;height:100px"></div>
<p>First attribute is:</p>
<p id="demo"></p>
<script>
let name = document.getElementById("myDiv").attributes.item(0).name;
document.getElementById("demo").innerHTML = name;
</script>
</body>
</html>