Code

The code block puts HTML, CSS or scripts on the page exactly as you enter them. It is meant for embeds and special cases – and needs to be used with care.

What it does

  • HTML and CSS land on the page unchanged, without syntax highlighting
  • Embeds and widgets: maps, booking tools, small counters – the code usually comes from the provider
  • Inline SVG and small building blocks that do not exist as a block
  • Meta Daten (meta data): your own ID, CSS classes and attributes for the block
  • Use with care: the block checks nothing. Foreign or faulty code can break the page or collect visitor data.

Live examples

Three harmless examples: on the left you see the code in the field, on the right the result on the page. The code is a single block with no scripts and no external content.

1 · A notice box with HTML and CSS

In the „Code“ field:

<div class="sc-hinweis">Closed until noon today.</div><style>.sc-hinweis{padding:1rem 1.25rem;border-left:0.375rem solid #ff3b00;background:#f4f0e6}</style>

On the page:

Closed until noon today.

2 · A graphic as inline SVG

In the „Code“ field:

<svg width="96" height="96" viewBox="0 0 96 96" role="img" aria-label="Orange circle with a check mark"><circle cx="48" cy="48" r="44" fill="#ff3b00"/><path d="M28 50l14 14 28-34" fill="none" stroke="#fff" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/></svg>

On the page:

3 · A collapsible note with the HTML element „details“

In the „Code“ field:

<details><summary>Do you have gluten-free bread?</summary><p>Yes, every Thursday. Please order by Wednesday.</p></details>

On the page:

Do you have gluten-free bread?

Yes, every Thursday. Please order by Wednesday.

How to do it in the Panel

Four steps – the last one matters most.

Click the plus in a layout, open the group „Werkzeuge“ and pick „Code“.

In the „Inhalt“ (content) tab, paste the code into the field „Code“, for example the embed code of a service. The field is required.

Open the preview and check that the code looks right – on a phone too.

The code runs on your page unchecked. Only use code from sources you trust. For embeds from third parties, also check data protection.