-3

I want to know the proper way of putting css and js files in head tag in any webpage having a more than 5 to 6 css files and js files respectively.

Sagar Kodte
  • 3,723
  • 4
  • 23
  • 52
  • Css in the header, and js in the final part of the web . Why? because javascript is slow and you'll hate to wait when a page is loading ( blank ) – Enrique Quero Dec 16 '15 at 12:29
  • 1
    @EnriqueQuero, _javascript is slow_ ? Please correct it bro! – Rayon Dec 16 '15 at 12:30
  • Please do a little research before asking a question. Simple google search will do – T J Dec 16 '15 at 12:32

2 Answers2

3

1) If you have more than 5 or 6 *.css / *.js files, please consider merging and minfying them into one *.js / *.css file via Grunt / Gulp.

2) CSS files. Put them in your header.

3) JS files. Put them right before closing "body" tag.

  • sometimes when i used any slider or any jquery.I linked to all file .js and .css file..but still this slider is not work because of .js files vertical alignment with the according to webpage code work. got it?? – Sagar Kodte Dec 16 '15 at 12:40
0

Just place your external JS and CSS file under your head tag. like:

<head>
<link href="../intel/styles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../script/Script.js"> </script>
</head>
shishir
  • 851
  • 3
  • 11
  • 27