Type Here to Get Search Results !

📄 HTML Structure:

html
<!DOCTYPE html> 
<html> 
<body> 
<h2>JavaScript in Body</h2> <p id="demo"></p> 
<script> document.getElementById("demo").innerHTML = "My First JavaScript"; </script> 
</body> 
</html>

🏗️ HTML Structure Explanation:

  • <!DOCTYPE html>: Declares the document type and version of HTML being used.
  • <html>: The root element of an HTML page.
  • <body>: The body of the HTML document, where visible content goes.
  • <h2>JavaScript in Body</h2>: Heading level 2 element displaying "JavaScript in Body".
  • <p id="demo"></p>: Paragraph element with an id attribute set to "demo". This will be manipulated by JavaScript.
  • <script>: This tag is used to define a client-side script like JavaScript.
  • </script>: Closing tag for JavaScript.
Tags

Post a Comment

0 Comments