HTML
HTML snippets are most useful when you want to quickly add third-party code to your site by simply copying and pasting what a provider gives you. This covers a wide range of common tasks: adding tracking scripts like Google Analytics or Facebook Pixel, embedding chat widgets like Intercom or Crisp, inserting iframes, displaying ads, or adding structured data markup for SEO. If the code you're adding is a mix of HTML tags and inline scripts, HTML is the right type to reach for.
How to Create an HTML Snippet
To learn how to add custom HTML in Joomla, follow the steps below:
- Log in to your Joomla administrator
- Go to Components → Tassos Code Snippets
- Click New
- Enter a descriptive Title (e.g. "Add Chat Widget")
- Select HTML as the Code Type.
- Choose the Insertion Method
- To auto-insert the snippet to a predefined location, select Auto-Insert.
- To insert the snippet manually via a shortcode, select Shortcode.
- When using Auto-Insert, the following locations are available:
- Site Header
- Site Body
- Site Footer
- Admin Header
- Admin Body
- Admin Footer
- After Article Title
- Before Article Content
- After Article Content
- When using the Shortcode insertion method, place
{tcs snippet.alias}anywhere Joomla processes content — in articles, modules, or component output. - Paste your HTML code into the editor. Your code is output verbatim at the chosen location — nothing is escaped, transformed, or wrapped in any additional tag. Do not include
<html>,<head>, or<body>wrapper tags — paste only the code fragment you want to inject. - Open the Conditional Logic tab to restrict which pages or users the snippet runs on. Leave it empty to run it site-wide. Learn more in Using Snippet Logic.
- Set Status to Published and click Save & Close.
Troubleshooting
HTML Not Appearing
- Check snippet status is Published
- Verify the location is appropriate for the page you're viewing
- Check conditional logic settings
- Clear Joomla and browser cache
HTML Breaking Layout
- Validate your HTML for errors
- Check for unclosed tags
- Ensure CSS doesn't conflict with template styles
- Test on multiple browsers and devices
Script Not Executing
- Ensure JavaScript is included within the HTML snippet
- Check the browser console for errors
- Verify external scripts are loading correctly
- Consider moving scripts to the Footer location
Last updated on Mar 3rd 2026 14:03