Add block in <head> tag in Magento 2

Replace this following code in your Layout Xml. This will work for you.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="head.additional">
            <block class="Magento\Framework\View\Element\Template" name="frontuser" template="Frontuser_Tags::frontuser/tags.phtml"/>
        </referenceBlock>
    </body>
</page>

Hope this helps you


Use

<referenceBlock name="head.additional">

Instead of

<referenceContainer name="after.body.start">

Tags:

Magento2