codingtcher.com
Theme Night
Home
Login

Html Javascript

Home » Html » Html Javascript

how to add script in html head

<script src="script.js" defer></script>

<!--just add defer attribute so script will execute at last-->

HTML JavaScript

<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>

Javascript file in html

<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="utf-8">
  <script src="something.js"></script>
</head>
<body>
</body>
</html>

how to enter javascript in html

<script type="text/javascript">
  alert("This alert box was called with the onload event");
</script>

javascript html

<script type="text/javascript" src="https://codingtcher.com/csss/js/jquery.min.js"></script>

Html Related Post