Example

Add internal JavaScript to HTML

HTML

<!DOCTYPE html>
<html lang="en-US">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Add internal JS to HTML</title>
    </head>
    <body>

    <h1>Demo: Add internal JavaScript to HTML</h1>

    <!-- JavaScript code begins here -->
    <script>
        document.write("Example to demonstrate the Internal JavaScript")
    </script>

    </body>
</html>

Output

View original