Inline JavaScript Code

JavaScriptAny JavaScript code, which is placed directly within a HTML file, is called Inline JavaScript code.  Inline JavaScript code should not be lengthy.  It should be a little piece of JavaScript code.  Example of Inline JavaScript code is given below.

<html>
<head>
<title>JavaScript Tutorial </title>
</head>
<body>
<script type="text/javascript">

alert("Hello World");
 
</script>
 
</body>
</html>