HTML TutorialLesson 27Free preview
HTML JavaScript
This lesson is part of HTML · All levels
Summary
JavaScript can be inserted into an HTML page with the <script> element. The code is usually placed before the </body> closure so that the page element has been loaded first. In addition to internal code, scripts can also be loaded from separate files with the src attribute.
Key points
- <script> used to write or load JavaScript
- Put the script at the end of the <body> so that the DOM is ready to process
- The external script uses <script src="app.js"></script>
- JavaScript adds interactive behavior to static pages
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.