About this block
The HtmlCodeBlock renders raw HTML markup directly on the page. It bypasses the CMS rendering pipeline and outputs whatever HTML is authored in the HtmlContent field verbatim.
This block is intended for developers and advanced editors who need to embed custom HTML that is not achievable through standard blocks — for example, a third-party widget embed code, a custom SVG illustration, a structured data snippet or a legacy component not yet ported to the block library.
Use with caution. Raw HTML bypasses CMS content sanitisation. Only trusted editors should have access to pages containing HtmlCodeBlocks. Malformed HTML can break page layout.
When to use HtmlCodeBlock
- Third-party widget embeds (e.g. chatbots, survey tools, map embeds)
- Custom SVG illustrations or interactive graphics
- Structured data JSON-LD snippets
- Legacy component HTML pending migration to the block library
When NOT to use HtmlCodeBlock
- Standard content — use RichTextBlock, ImageBlock or VideoBlock instead
- Layout adjustments — use LayoutBlock instead
- CTAs and links — use CtaBlock or CtaButtonBlock instead
Permissions
Access to HtmlCodeBlock should be restricted to developer-level CMS users. Raw HTML can introduce XSS vulnerabilities, break page rendering and override global CSS if misused.
40 billion+
containers collected annually through TOMRA deposit return systems