<html>
<body>
<h1>The Element Object</h1>
<h2>The contains() Method</h2>
<div id="myDIV">
<p>I am a p element inside "myDIV", and I have a <span id="mySPAN"><b>span</b></span> element inside of me.</p>
</div>
<p>Does the div element contain a span element?</p>
<p id="demo"></p>
<script>
const span = document.getElementById("mySPAN");
let answer = document.getElementById("myDIV").contains(span);
document.getElementById("demo").innerHTML = answer;
</script>
</body>
</html>