Where does Drupal render the content of the  tag? I'm calling drupal_add_html_head() a few times to add meta data for facebook integration. To my surprise, this data is not rendered in the order I add it.

Where is this data actually rendered? I would like to examine the code so I can understand the logic behind it.

I'm aware there's hook_html_head_alter too, but without understand the render order, messing with the order of input data is not likely helpful.
template_preprocess_html() gets the tags for the &lt;head&gt;, and adds them to the html.tpl.php template file as $head.

The template file looks like this:

..
&lt;head profile="&lt;?php print $grddl_profile; ?&gt;"&gt;
  &lt;?php print $head; ?&gt;
  &lt;title&gt;&lt;?php print $head_title; ?&gt;&lt;/title&gt;
..