- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why prefer to put JavaScript in the footer of an HTML page?
With JavaScript, you can put JavaScript anywhere on the page, whether inside <head> or <body> tag. But, it is a good practice to add JavaScript in the footer i.e. just before closing the <body> tag. This is because −
- It loads script faster.
- It will not block any DOM content to load.
- It loads the web page before loading JavaScript
- Improves display speed
- Page loads faster
Advertisements
To Continue Learning Please Login
Login with Google