What is Scripting?
What is HTML Script Tag?
How to Script in HTML?
(Explain that there’re two ways to write javascript and they are:
- Inline JavaScript: within the body of <script> </script> tag
- Importing JavaScript source code from external resources: via src attribute of <script> tag
Inline JavaScript: write within <script> tag
Example: writing inline JavaScript
Importing JavaScript Source Code from External Resources: <script> src Attribute
Example: importing JavaScript source code from external resources
HTML Script Tag type Attribute:
Example: using tag attribute of HTML script tag
HTML Script Tag defer Attribute:
Example: using defer attribute of HTML script tag:
HTML Script Tag async Attribute
Example: using async attribute of HTML script tag
HTML Script Tag crossorigin Attribute
Example: using crossorigin attribute of HTML script tag
Where to Put HTML <script> tag in a Page?
HTML Script Tag Note: