- The
p
element - The
h3
element - The
body
element - The JavaScript code inside the
script
element <html>
<body>
<h3 id="magazine">Wired</h3>
<p id="about">Stories from the future</p>
<script>
var code = document.getElementById("about");
</script>
</body>
</html>]]>The variable code
contains the p
element.