Situatie
The HTML <script>
tag serves for embedding client-side scripts, whether containing scripting statements or linking to an external script file. Basically <script>
HTML element is used to embed executable code or data and it dynamically alters the content, manages form validation, and manipulates page styles, enhancing user interactivity and experience.
Solutie
Pasi de urmat
/ For Internal JavaScript Linking <script> Script Contents... </script> // For External JavaScript Linking <script src="script.js"></script>
<!DOCTYPE html>
<html>
<body>
<h1>Geeksfo</h1>
<h2>HTML script Tag</h2>
<p id=”GFG”></p>
<!– HTML script Tag Starts Here –>
<script>
document.getElementById(“GFG”).innerHTML
= “Hello Geeksfor!”;
</script>
<!– HTML Script Tag Ends Here –>
</body>
</html>
Leave A Comment?