HTML script tag

HTML script tag

IN HTML script tag is used to indicate client-side script or we can say that with the help of Script tag we can add a script within your HTML document like javascript.
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage.

Syntex

<script>  
  //code to be executed  
</script>

Attributes

Attribute Description Compatibility
src URL of an external script file. HTML 4.01, HTML5
type media type of the script. HTML 4.01
async script is executed asynchronously. HTML5
defer script is executed after document has been parsed. HTML 4.01, HTML5