---
title: "Site Locations - Tassos Code Snippets"
description: "Site locations are frontend insertion points available for HTML, CSS, JavaScript, and External File snippets. They target three structural areas prese"
url: "https://www.tassos.gr/docs/tassos-code-snippets/locations/site"
date: "2026-04-05T16:08:59+00:00"
language: "en-GB"
---

[ Home ](https://www.tassos.gr/index.php?option=com_content&view=category&layout=blog&id=24&Itemid=1088) / [ Tassos Code Snippets ](https://www.tassos.gr/index.php?option=com_content&view=category&id=120) / [ Snippet Locations ](https://www.tassos.gr/index.php?option=com_content&view=category&id=123)

#  Site Locations

Site locations are frontend insertion points available for HTML, CSS, JavaScript, and External File snippets. They target three structural areas present on every frontend page: the document head, the opening of the body, and the closing of the body, giving you control over when and where your code is loaded relative to page content.

## [Available Locations](#available-locations)

### [Site Header](#site-header)

The Header location inserts code inside the `<head>` section of every frontend page, before any content is rendered. This makes it the right place for anything the browser needs to know about the page upfront — CSS stylesheets, external font references, meta tags (OpenGraph, Twitter Cards, structured data), and critical inline styles.

Because the browser processes the `<head>` before painting anything on screen, loading CSS here prevents the flash of unstyled content that occurs when styles arrive late. Keep this location lean: only include what is genuinely needed before first render, as heavier resources here delay the time to first paint.

### [Site Body](#site-body)

The Body location inserts code immediately after the opening `<body>` tag, making it one of the earliest positions in the rendered page. It is primarily used for analytics and tag management code — Google Tag Manager's `<noscript>` fallback, for example, is specifically designed for this position.

Most analytics and advertising platforms recommend placing their initialisation code as high in the page as possible for accurate data collection, making the Body location the natural fit. For JavaScript-based implementations where the script itself can live in the Header or Footer, the Body location is most useful for HTML-only snippets that must appear before any visible page content.

### [Site Footer](#site-footer)

The Footer location inserts code just before the closing `</body>` tag, after all page content has been rendered. This is the right home for most third-party scripts, chat widgets, social sharing buttons, lazy-loading libraries, performance monitoring tools, and any JavaScript that manipulates the DOM.

Loading scripts at the Footer means they run after the browser has painted the page, which improves perceived performance and avoids blocking the rendering of visible content. Scripts placed here can safely assume the DOM is fully available without needing to wait for a `DOMContentLoaded` event.

## [Supported Snippet Types](#supported-snippet-types)

Not all snippet types are available at every site location. Use this matrix to confirm your chosen type supports your target location.

 | Snippet Type | Header | Body | Footer |
|---|---|---|---|
| **HTML** | ✓ | ✓ | ✓ |
| **CSS** | ✓ | — | — |
| **CSS External Files** | ✓ | — | — |
| **JavaScript** | ✓ | — | ✓ |
| **JS External Files** | ✓ | — | ✓ |
| **PHP** | — | — | — |

PHP snippets run server-side on page load and are not tied to a layout location. The Body location only supports HTML snippets, as it is intended for markup-based embeds rather than stylesheets or scripts.

## [Troubleshooting](#troubleshooting)

### [My snippet does not appear](#my-snippet-does-not-appear)

First check that the snippet is published and that its assigned location matches the area of the page you are inspecting. Then clear the Joomla page cache and any caching layers in front of your site, and reload the page. Inspect the raw page source (not the browser's rendered DOM) to confirm whether the code was injected at all — browser extensions and security tools can strip or hide injected content without it being visible in the inspector.

### [CSS is not being applied](#css-is-not-being-applied)

CSS snippets are only available in the Header location. If you have placed a CSS snippet in a location that does not support it, it will not be injected. Check the snippet's configured location and move it to Header if needed. If the snippet is in the Header but styles are still not applying, open the browser's DevTools and check whether the rule exists in the computed styles — the issue may be a specificity conflict with the template's own stylesheet rather than a loading problem.

### [JavaScript is not executing](#javascript-is-not-executing)

Check the browser console for errors first, as a syntax error will prevent the entire script block from running. If no errors appear, verify that any libraries your script depends on are loaded before it — use the snippet's Priority field to control load order, with lower numbers loading first. Scripts placed in the Header load earlier than those in the Footer, so if your script depends on the DOM being ready, Footer is the safer location.

 Last updated on Mar 16th 2026 15:03

## Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.tassos.gr"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Home",
            "item": "https://www.tassos.gr/docs"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Tassos Code Snippets",
            "item": "https://www.tassos.gr/docs/tassos-code-snippets"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Snippet Locations",
            "item": "https://www.tassos.gr/docs/tassos-code-snippets/locations"
        },
        {
            "@type": "ListItem",
            "position": 5,
            "name": "Site Locations",
            "item": "https://www.tassos.gr/docs/tassos-code-snippets/locations/site"
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://www.tassos.gr/docs/tassos-code-snippets/locations/site"
    },
    "headline": "Site Locations",
    "image": {
        "@type": "ImageObject",
        "url": "https://www.tassos.gr/"
    },
    "publisher": {
        "@type": "Organization",
        "name": "Tassos",
        "logo": {
            "@type": "ImageObject",
            "url": "https://www.tassos.gr/https://www.tassos.gr/media/brand/logo-text.png"
        }
    },
    "author": {
        "@type": "Person",
        "name": "Tassos Marinos",
        "url": "https://www.tassos.gr/docs/tassos-code-snippets/locations/site"
    },
    "datePublished": "2026-03-16T14:45:46+02:00",
    "dateCreated": "2026-03-16T14:45:46+02:00",
    "dateModified": "2026-03-16T15:07:57+02:00"
}
```
