Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>The Document Object</h1>
<h2>The images Property</h2>
<img src="klematis.jpg" alt="flower" width="150" height="120">
<img src="klematis2.jpg" alt="flower" width="150" height="120">
<p>Display the URL of each img element:</p>
<p id="demo"></p>
<script>
const myImages = document.images;
let text = "";
for (let i = 0; i < myImages.length; i++) {
  text +=  myImages[i].src + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>