AI disclosure banner in HTML: copy-paste snippet for chatbot and AI-content notices (EU AI Act Article 50)
This is a template, not legal advice. It is general information and not a substitute for the advice of an attorney. It does not decide whether Article 50 applies to you, does not review your site, and does not make anything compliant. Wording and code to adapt, nothing more. Law and dates as last checked on 2026-11-09 for our free notice picker.
You want a banner or label on your site that tells people when AI is involved. This page gives you the HTML for it, two ways: a small web component, and a plain HTML and CSS banner that needs no JavaScript. First, what the law text asks you to show.
What Article 50 asks a site to show
Article 50 of Regulation (EU) 2024/1689 (the EU AI Act) is about people knowing when AI is involved. In short, by the paragraph:
| Where | What a site shows | Paragraph |
|---|---|---|
| Chatbot, voice agent, AI-written replies | People are told they are interacting with an AI system, unless that is obvious to a reasonably well-informed, observant and circumspect person given the circumstances and context. The Commission's guidelines read that exception restrictively. The information must be clear and distinguishable and given at the latest at the first interaction. | Article 50(1), with 50(5) |
| Deep fake image, audio or video | A deployer discloses that the content has been artificially generated or manipulated. | Article 50(4), first subparagraph |
| AI text published to inform the public on matters of public interest | A deployer discloses that the text has been artificially generated or manipulated, unless it has had human review or editorial control and a person holds editorial responsibility. | Article 50(4), second subparagraph |
| Emotion recognition or biometric categorisation | A deployer informs the people exposed to it that the system is operating. | Article 50(3) |
Who owes which notice depends on whether you are the provider or the deployer of the system, which the notice picker explains for each case. A visible banner does not replace the machine-readable marking that Article 50(2) asks providers of generative systems to apply. Most of these duties have applied since 2 August 2026; Article 50(2) has a transition to 2 December 2026 for systems already on the market before that day. Other rules (GDPR, ePrivacy, consumer, advertising and press law) may ask for more; Article 50(6) leaves them in place. Official text: Article 50 on the Commission AI Act Service Desk.
Option 1: the web component (one line)
The free ai-disclosure-notice package is a small web component with no dependencies, no network calls and no storage. With a bundler:
npm install ai-disclosure-notice
<script type="module">
import 'ai-disclosure-notice';
</script>
<ai-disclosure-notice type="chatbot" lang="en" variant="banner" dismissible></ai-disclosure-notice>
Without a bundler, load the file from a CDN (jsDelivr or unpkg both serve npm packages) with a module script tag, and pin the version so the file cannot change under you:
<script type="module" src="https://cdn.jsdelivr.net/npm/ai-disclosure-notice@0.1.0/src/ai-disclosure-notice.js"></script>
<!-- or: https://unpkg.com/ai-disclosure-notice@0.1.0/src/ai-disclosure-notice.js -->
<ai-disclosure-notice type="chatbot" lang="en" assistant="Mia" company="Example Ltd" variant="banner" dismissible></ai-disclosure-notice>
Loading from a CDN means your visitors' browsers contact that CDN, which may matter for your privacy notice. If it does, copy the one file (node_modules/ai-disclosure-notice/src/ai-disclosure-notice.js) onto your own server and point the script tag at it.
| Attribute | Values |
|---|---|
type | chatbot (default), generated-content, deepfake, emotion-recognition |
lang | en (default), de |
variant | inline (default), banner |
dismissible | present or absent; adds a close button, and Escape closes it when focus is inside |
assistant, company | chatbot only: with both set, shows the full sentence ("You're chatting with Mia, an AI assistant from Example Ltd.") |
For AI-generated images or text use type="generated-content" or type="deepfake". The text is template wording written from the Regulation; read it, and change what does not fit your case. The package page lists every attribute and the CSS custom properties for colours.
Option 2: plain HTML and CSS, no JavaScript
If you cannot add a script, a static banner works the same for the reader. Put it where people see it before or with the first interaction, in the page's HTML and not in an image:
<style>
.ai-banner{margin:0;padding:10px 16px;background:#eef4fb;color:#1b1f23;
border-bottom:1px solid #b9cde3;font:16px/1.5 system-ui,sans-serif}
.ai-banner a{color:#0b4f9c}
.ai-banner a:focus-visible{outline:3px solid #0b4f9c;outline-offset:2px}
@media (prefers-color-scheme:dark){.ai-banner{background:#1c2a38;color:#e6e8ea;border-color:#3a5169}.ai-banner a{color:#9ccaff}}
</style>
<p class="ai-banner" role="note" aria-label="AI notice">
You're chatting with [Assistant name], an AI assistant from [Company]. It is not a human.
<a href="[link to your AI policy or contact page]">Ask for a person</a>.
</p>
Replace everything in [square brackets]. For AI-generated content, swap the sentence, for example "This text was generated with AI." or "AI-generated: this is not real footage.", and keep it next to the content it is about. Sample wording for more channels is in the free notice picker.
Accessibility notes
- Plain text in the page. Keep the notice as real text that screen readers announce. The component renders it as
role="note"with anaria-label; the static version above does the same. Do not put it in an image, a tooltip or behind a click. - Contrast. Text needs a contrast ratio of at least 4.5:1 against its background (WCAG 2.x AA); check your own colours if you change them, including the dark-mode pair and link colours.
- Keyboard. A close button must be reachable with Tab, show a visible focus ring and work with Enter and Space. The component's dismiss button closes with Escape when focus is inside it. Do not trap focus.
- Dismissing. A dismissed notice should come back on the next page or chat start; the component stores nothing, so it returns on reload. For a chatbot, show the notice again whenever a new conversation starts.
- Motion. If you animate the banner in, switch it off under
prefers-reduced-motion: reduce; the component does. - Language. Set the notice in the language of the page, or use
lang="de"on the component for German. The German wording has not been reviewed by a native-speaking lawyer or legal translator.
Want wording for more cases?
The free notice picker shows sample wording and the Article 50 paragraph for one role, system and channel, in your browser. For notices for every channel in one file (web chat, phone, email, in-product), with a paragraph-by-paragraph checklist, see the Article 50 Transparency Notice Kit (templates, from US$29). German version of this page: KI-Hinweis-Banner in HTML.
Related guides
- Done-for-you company contact lists from your list of websites
- We fill your GPSR product fields for you (WooCommerce, Tidyleaf import CSV)
- Free GPSR product information sheet generator (print sheet and Tidyleaf import row)
- Free GPSR product label generator (SVG labels and A4 print sheet from a CSV)
- Free accessibility statement generator (English and German, HTML and text)
- Accessibility statement for a Shopify or WooCommerce shop: what EAA Annex V and the German BFSG ask you to publish