How do I add the  tag in ? If I want to add JavaScript in the head tag, I use drupal_add_js($js, 'inline'). This will add a &lt;script type="text/javascript"&gt;.

How do I add the &lt;noscript&gt; tag? I want to add the following in &lt;head&gt; also.

&lt;noscript&gt;
  &lt;meta http-equiv="refresh" content="5;url=&lt;?php echo $file ?&gt;" /&gt;
&lt;/noscript&gt;


BTW, I'm using a simple module for this.

function custom_download_menu() {
    $items['download-code'] = array(
    'title callback' =&gt; 'custom_download_page_title',
    'page callback' =&gt; 'custom_download_view',
    'access arguments' =&gt; array('access content'),
    'access callback' =&gt; TRUE,
    );
    return $items;
  }

function custom_download_view() {
    $js = "var time_left = 5;
        var cinterval;

        function time_dec(){
            if(time_left &gt; 0) time_left--;
            document.getElementById('countdown').innerHTML = 'Your download will start in ' + time_left + ' seconds...';
            if(time_left &lt; 1){
                clearInterval(cinterval);
                window.location = '&lt;?php echo $file ?&gt;';
            }
        }

        cinterval = setInterval('time_dec()', 1000);";

    drupal_add_js($js, 'inline');
}
You can add elements to the &lt;head&gt; section of a web page using drupal_add_html_head(). 

$target = url('enable-javascript', array('absolute' =&gt; TRUE));
$meta = array(
  '#theme' =&gt; 'html_tag',
  '#tag' =&gt; 'meta',
  '#attributes' =&gt; array(
    'http-equiv' =&gt; 'refresh',
    'content' =&gt; "2; url=$target"
  )
);
$noscript = array(
  '#theme' =&gt; 'html_tag',
  '#tag' =&gt; 'noscript',
  '#value' =&gt; drupal_render($meta)
);
drupal_add_html_head($noscript, 'noscript');


API Documentation