> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fumbled.lol/llms.txt
> Use this file to discover all available pages before exploring further.

# Allowed HTML tags & security

> Complete list of all 41 allowed HTML tags, attribute sanitization rules, CDN image restrictions, and DOM limits for Custom HTML cards.

Your Custom HTML snippet renders inside `.fumbled-custom-card` on your profile. On save, the server parses and sanitizes the fragment to enforce strict security and performance limits.

## Size and DOM limits

| Limit | Value | Behavior when exceeded |
| - | - | - |
| Maximum HTML size | **16 KB** (`16,384` bytes) | Save is rejected with an error |
| Maximum DOM depth | **16 levels** | Elements deeper than 16 levels are removed |
| Maximum DOM nodes | **250 nodes** | HTML is truncated after 250 nodes |

## Allowed HTML tags

Only the 41 semantic, formatting, table, and media tags below are permitted:

| Category | Allowed tags |
| - | - |
| Structure & text | `<div>`, `<span>`, `<p>`, `<h1>`, `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`, `<br>`, `<hr>` |
| Inline formatting | `<strong>`, `<em>`, `<b>`, `<i>`, `<u>`, `<s>`, `<code>`, `<pre>`, `<blockquote>`, `<kbd>`, `<mark>`, `<sup>`, `<sub>`, `<small>`, `<time>` |
| Lists | `<ul>`, `<ol>`, `<li>` |
| Links & images | `<a>`, `<img>`, `<figure>`, `<figcaption>` |
| Interactive disclosure | `<details>`, `<summary>` |
| Tables | `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, `<td>` |

### Stripped elements

The following elements and their entire subtrees are removed on save:

`<script>`, `<style>`, `<iframe>`, `<object>`, `<embed>`, `<svg>`, `<math>`, `<template>`, `<noscript>`, `<title>`, `<textarea>`, `<select>`, `<form>`, `<button>`, `<input>`, `<base>`, `<meta>`, `<link>`, `<frame>`, `<frameset>`, `<applet>`, `<portal>`, `<xmp>`, `<noembed>`, `<noframes>`, `<plaintext>`, `<head>`, `<body>`, `<html>`, `<audio>`, `<video>`, `<source>`, `<track>`, `<canvas>`.

Any other unrecognized tag is unwrapped (its inner text/children are kept, without the tag itself).

## Attribute rules

| Attribute | Allowed on | Sanitization behavior |
| - | - | - |
| `class` | Any allowed tag | Valid tokens (`[a-zA-Z0-9_-]{1,64}`) are kept; reserved `mantine-*` classes are removed |
| `id` | Any allowed tag | Valid tokens (`[a-zA-Z0-9_-]{1,64}`) are automatically prefixed with `u-` |
| `style` | — | **Removed**; write styles in the **Custom CSS** tab targeting `.fumbled-custom-card` |
| `on*` handlers | — | **Removed** |
| `title`, `alt`, `aria-label` | Any allowed tag | Kept when non-empty |
| `open` | `<details>` | Kept as boolean attribute |
| `datetime` | `<time>` | Kept when non-empty |
| `colspan`, `rowspan` | `<td>`, `<th>` | Integer values clamped to `1..100` |
| `href` | `<a>` | Allows `https://`, `http://`, and `mailto:`. Automatically adds `target="_blank"` and `rel="noopener noreferrer nofollow ugc"` |
| `src` | `<img>` | Restricted to relative non-API paths or `https://` URLs on `cdn.fumbled.lol` or `fumbled.lol`. Automatically adds `loading="lazy"` and `decoding="async"` |

> [!WARNING]
>
> External image URLs from third-party hosts are stripped from both `<img src>` and CSS `url()` to protect visitor IP privacy. Upload images to your fumbled.lol file host first and use the `cdn.fumbled.lol` or `files.fumbled.lol` URL.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.