Adding javascript in html.tpl I am trying to add JavaScript in footer with drupal_add_js(drupal_get_path('theme', 'mytheme') .'/js/libs/jquery-1.7.1.min.js', array('type' =&gt; 'file', 'scope' =&gt; 'footer'));, but for some reasons, it is not getting loaded.

What is wrong in my code?
Consider what's at the top of the html.tpl.php file...a call to &lt;?php print $scripts; ?&gt;.

This would logically mean that all scripts added by drupal_add_js() in the current page call have already been rendered down into the $scripts variable, and printed to the page. 

Thus, when you call drupal_add_js() inside html.tpl.php, it's too late to add new scripts with drupal_add_js().

This sort of code should never really be inside a template file anyway to be honest, it should be inside a preprocess function inside your theme's template.php file.

On another note, it looks like you're trying to insert jQuery 1.7 into the current page. This may cause you all sorts of problems as Drupal already loads its own version of jQuery into the page...you'll probably get conflicts.

The better way would be to install the development version of the [jQuery update][1] module, which has the option to use jQuery 1.7 throughout the site. I don't know the current state of this; the last time I checked (a couple of months ago) there were still some core JS elements that break using 1.7.

You can find a bit more info here: How do I update jQuery to the latest version I can download?