html close tag is required in either case. Script Tag - async & defer. A script tag can contain these attributes: Following is an example where we are using JavaScript to define a simple JavaScript function − The JavaScript is mainly used in form validation, dynamic changes of content, image manipulation, etc. The script is defined between the opening and closing