."> ."> .">

Old JavaScript examples may use a type attribute: <script type="text/javascript">.

The type attribute is not required. JavaScript is the default scripting language in HTML.

JavaScript Display Possibilities

JavaScript can "display" data in different ways:


You can skip the window keyword.

In JavaScript, the window object is the global scope object, that means that variables, properties, and methods by default belong to the window object. This also means that specifying the window keyword is optional:


Javascript HTML DOM document

JavaScript DOM Document

HTML DOM Event Object