91-9990449935 0120-4256464 |
HTML Script TagHTML script tag is used to specify client-side script such as JavaScript. It facilitate you to place a script within your HTML document. JavaScript is used for image manipulation, form validation, and dynamic content. The syntax of script tag is given below: Attributes of HTML script tag
Usage of script tagThere can be two usage of HTML script tag:
Embed script codeThe script tag can be used within <body> or <head> tag to embed the scripting code. Let's see the example to have script tag within HTML body. Test it NowOutput: JavaScript is a simple language for trainingtrains learners Let's see the example to have script tag within HTML head tag. Test it NowLink script fileThe script tag can be used to link external script file by src attribute. It must be used within the <head> tag only. Click me to see full exampleSupporting Browsers
Next TopicHTML noscript tag
|