Enhancement of CSS and JavaScript

Why we add scripts at the bottom of the file and CSS at the top of the file?

Last updated:7/20/2021 12:56:14 AM

1 Answers

Ethan Karla
Ethan Karla

While creating a web page, a developer has to keep in mind that the CSS will be linked at the top of the page and the JavaScript code will be at the bottom of the page.

Because CSS files are used to enhance the look of the HTML page whereas JavaScript is used to make the website interactive. So look and feel is more important than interactive when the page is loaded so most of the website follow these rules.

Hope this information will be helpful for you.

Happy Coding!

Answer