HTML JavaScript
JavaScript makes HTML pages more dynamic and interactive.
Online Examples
Insert a script
How to insert a script into an HTML document.
Use <noscript> tag
How to deal with browsers that do not support scripts or disable scripts.
HTML <script> tag
<script> tag is used to define client-side scripts, such as JavaScript.
<script> element can contain script statements or point to external script files via the src attribute.
JavaScript is most commonly used for image operations, form validation, and content dynamic updates.
The following script will output "Hello World!" to the browser:
Tip:Learn more about JavaScript tutorials, please checkJavaScript tutorial!
HTML <noscript> tag
<noscript> tag provides alternative content when browsers do not support scripts or disable scripts.
The <noscript> element can contain all elements that can be found in the body of an HTML page.
Only when the browser does not support scripts or disables scripts will the <noscript> element display its content:
Example
Try it »
JavaScript experience (from the JavaScript tutorial on this site)
JavaScript example code:
HTML script tag
| Tag | Description |
|---|---|
| <script> | Defines the client-side script |
| <noscript> | Defines the text to be output when browsers do not support scripts or disable scripts. |