Javascript Syntax

The script tag

To use JavaScript in HTML, need to use the <script> tag, and define the type attribute is text/javascript

<script type="text/javascript">
alert("Prompt text");

JavaScript code is usually used in conjunction with HTML code, because JavaScript is inherently to make up for the defects of HTML. Here is an example of how JavaScript and HTML code can be used together:

    <script type="text/javascript">

Copyright 2014-2017 by All Rights Reserved.