Embedding JS

JavaScript is applied to your HTML page in a similar manner to CSS. Whereas CSS uses <link> elements to apply external stylesheets and <style> elements to apply internal stylesheets to HTML, JavaScript only needs one friend in the world of HTML — the <script> element.

Adding JavaScript to your Webpage

  • Internal JavaScript: JS code added inside HTML files
  • External JavaScript: External JS code linked in HTML file
Scroll to Top