--- title: "HTML Block" slug: "custom-html-blocks" tags: ["Custom HTML Block", "Thrive Branding", "Super Admin Control"] updated: 2026-10-20T13:56:55Z published: 2026-10-20T13:56:55Z canonical: "docs.thrivelearning.com/custom-html-blocks" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.thrivelearning.com/llms.txt > Use this file to discover all available pages before exploring further. # HTML Block An **HTML Block** lets you add your own HTML to a Space or to Mixed Content, giving you control over layout, branding, and interactive elements that go beyond the standard content blocks. This article explains what the block can do, how to keep it on brand, and what to check before you publish. ## Adding an HTML Block Manually You can add a Custom HTML Block in two places: a Space, or a piece of Mixed Content. You can add it either when you first create the Space or Mixed Content item, or when you edit an existing one. 1. Create a new Space or Mixed Content item, or open an existing one to edit. 2. In **Add a block**, click **HTML**. 3. In the block editor, paste or write your HTML into the **Enter HTML content here** field. .png?sv=2026-02-06&spr=https&st=2026-12-01T17%3A22%3A03Z&se=2026-12-01T18%3A22%3A03Z&sr=b&sp=r&sig=gKBrn4M3%2BO2IrfSSI96afNfGGiiwijxSHst6StDizAA%3D) 4. Click **Preview** to check how it renders before you publish. 5. When you’re ready, click the **Save draft** button, or use the dropdown next to it to **Publish**. The block renders your HTML directly within the Space or Mixed Content for learners. > [!WARNING] > Important: > > Thrive strips JavaScript from an HTML block, but doesn't otherwise validate your code. We can't guarantee how it will display in your Thrive platform, so preview and test it thoroughly before publishing. > [!NOTE] > Note: > > The simplest way to keep a block on brand is to use standard HTML tags with no styling of your own – an `<h1>`, `<p>`, or `<a>` on its own. Your content then inherits Thrive's core styling automatically, including fonts, colours, and spacing, and it supports light and dark mode without any extra work. > > If you'd rather style the block yourself, you can – [the section below](/v1/docs/custom-html-blocks#writing-html-that-looks-like) shows how to match Thrive's look. Keep in mind that once you set your own styles, Thrive can't guarantee behaviour like dark mode, and your block may not pick up future styling updates. ## Adding an HTML Block With AI **Create with AI** lets you describe what you want in plain language and generate working HTML instantly, without writing code. It's available wherever you can add an **HTML** block, in both Spaces and Content Creator. ### Enabling the Feature **Create with AI** doesn't appear until an admin turns it on: 1. In the Thrive menu, go to **Configure** > **AI features** and scroll down to **Content Creator**. 2. Ensure **Content Creator: Text generation** is enabled. 3. Enable **Content creator: HTML blocks using AI**. 4. Set who can use it: **Everyone**, **Admins only**, or **Specific audience(s)**. ### Creating an HTML Block With AI 1. In the Space editor or Content Creator, click **Add a block** (or **Add your first block** if no blocks exist yet). 2. Select **HTML**, then select **Create with AI** from the dropdown. 3. In the modal that appears, enter a prompt describing the layout, content, or styling you want. For example: *"Create a two-column grid showing skill name and proficiency level with progress bars"* or *"Build a progress card with icons and a gradient background"*. 4. Click **Submit**. The AI generates the HTML and shows you a preview. 5. If you're happy with the result, click **Embed** to add it to your Space or content. 6. When you're ready to go live, click **Publish** (or **Publish Changes** in Spaces). Your HTML block is now live. ### Editing and Refining You can't edit the generated HTML directly in the modal. To make changes after generating: - **Re-prompt:** Open the modal again and describe the changes you want. The AI generates an updated version. - **Edit the source code:** Select the block and edit the HTML directly in the source code editor for precise changes. The styling guidance in this article applies to AI-generated blocks too — if you edit the source code, follow the same type, colour, and spacing conventions to keep your block consistent with Thrive's look. ## Writing HTML That Looks Like Thrive The block accepts any HTML, so the quickest way to stay on brand is to match Thrive’s type, colour, and spacing. Every example below uses inline styles, so you can paste the markup straight into the block without a separate stylesheet. ### Fonts Thrive uses one typeface, Poppins, for everything – headings, body, and links. Paste this once at the top of your HTML so the text does not fall back to a system font: html ```plaintext ``` When in doubt, set `font-family:'Poppins',sans-serif;` on your elements. ### Typography Headings are tight and confident, with `letter-spacing:-0.01em`. Body text sits at 16px with a 24px line height. | Element | Weight and Size | | --- | --- | | Heading 1 | 700 · 36/40 | | Heading 2 | 600 · 24/32 | | Heading 3 | 600 · 20/28 | | Body | 400 · 16/24 | | Body – small | 400 · 14/20 | html ```plaintext