HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress
HTML Reference

Quick Reference

The script tag is used to embed client-side scripts by linking to the script using the src attribute.

				
					<script type="text/javascript" src="/scripts/main.js"></script>
				
			

Attributes

The following attributes can be used within the script tag.

AttributeValueDescription
asyncasyncSpecifies that the external script is downloaded in parallel to parsing the page, and executed as soon as it is available (before parsing completes)
crossoriginanonymous
use-credentials
Sets the mode of the request to an HTTP CORS request
deferdeferSpecifies that the external script is downloaded in parallel to parsing the page, and executed after the page has finished parsing
integrityfilehashAllows a browser to check the fetched script to ensure that the code is never loaded if the source has been manipulated
nomoduleTrue
False
Specifies that the script should not be executed in browsers supporting ES2015 modules
referrerpolicyno-referrer
no-referrer-when-downgrade
origin
origin-when-cross-origin
same-origin
strict-origin
strict-origin-when-cross-origin
unsafe-url
Specifies which referrer information to send when fetching a script
srcURLSpecifies the URL of an external script
typescripttypeSpecifies the media type of the script

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.