HTML <script> type attribute
HTML <script> tag
Example
Insert a JavaScript in an HTML page:
<script type="text/javascript">
document.write("Hello World!");
</script>
|
Try it yourself!
|
Definition and Usage
The required type attribute specifies the MIME type of a script.
The type attribute identifies the content between the <script> and </script>
tags.
The MIME type consists of two parts: one media type and one subtype. For
JavaScript, the MIME type is "text/javascript".
Browser Support
The type attribute is supported in all major browsers.
Syntax
Attribute Values
Value |
Description |
MIME_type |
The MIME type. Some values:
- text/javascript
- text/ecmascript
- application/ecmascript
- application/javascript
- text/vbscript
Look at
IANA MIME types
for a complete list of standard MIME types.
Note: According to IANA, the "text/javascript"
MIME type is obsolete. The new standard is "application/javascript".
However, "application/javascript" is not supported by Internet Explorer. |
HTML <script> tag
Learn how your website performs under various load conditions
|
|
WAPT
is a load, stress and performance testing tool for websites and web-based applications.
In contrast to "800-pound gorilla" load testing tools, it is designed to minimize the learning
curve and give you an ability to create a heavy load from a regular workstation.
WAPT is able to generate up to 3000 simultaneously acting virtual users using standard hardware configuration.
Virtual users in each profile are fully customizable. Basic and NTLM authentication methods are supported.
Graphs and reports are shown in real-time at different levels of detail, thus helping to manage the testing process.
Download the free 30-day trial!
|
|