getHeadHtml() not outputting CSS included with {% includeCss %}
This is just an order of operations issue. The documentation is correct, but incomplete.

getHeadHtml() will only output head HTML that was queued up for it before the function was actually called. Any head HTML that is queued up after you've called getHeadHtml() will end up getting inserted in the default location - right before the &lt;/head&gt; tag.

So, if you had this in your template instead:

{% includecss %}
  .content {
      color:  red;
  }
{% endincludecss %}

&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Title&lt;/title&gt;
    &lt;!-- Here should the CSS start --&gt; 
        {{ getHeadHtml() }}
    &lt;!-- Here should the CSS end --&gt; 
  &lt;/head&gt;
  &lt;body&gt;

  &lt;/body&gt;
&lt;/html&gt;


Then the CSS would get included between the HTML comments as you’d expect.