AI TOOLS

Share a Tailwind CSS page as a link

An HTML page styled with Tailwind, often written by an AI tool, keeps its styling at a link when the Tailwind script or a built stylesheet travels with it. Two ways to do it, then upload and send.

4 min read·

Claude, ChatGPT and other AI tools often write single-file pages that load Tailwind CSS from a CDN script tag. In the chat preview the page looks finished. Sent as an attachment, it often opens as plain unstyled text, or not at all, because email and chat apps block scripts in attachments.

Hosted at a link, the page opens in a normal browser tab, the Tailwind script runs, and the reader sees what you saw in the preview.

Option 1: keep the CDN script

If the file already works when you open it from your computer, it will work at a link. Check the head for one of these:

  • ✓Tailwind 4: <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>. Custom colors and fonts go in a <style type="text/tailwindcss"> block with @theme, for example @theme { --color-brand: #4031c9; }.
  • ✓Tailwind 3: <script src="https://cdn.tailwindcss.com"></script>, with custom colors in a following <script>tailwind.config = { theme: { extend: { colors: { brand: '#4031c9' } } } }</script>.
  • ✓Pin a version so the page does not change when Tailwind releases one: @tailwindcss/browser@4.3.3 or cdn.tailwindcss.com/3.4.17.
  • ✓Tested in Chrome with both: text-4xl font-bold p-8 and a custom brand color rendered at 36px, weight 700, 32px padding and the set color.

What the CDN script costs

The script builds the CSS in the reader's browser after the page loads. Tailwind's documentation describes it as meant for development, not production. For a page you send to a few people that is usually fine; the trade-offs are:

  • ✓The page can show unstyled for a moment on a slow connection before the styles apply.
  • ✓It needs network access to the CDN; offline or behind a strict firewall it shows unstyled.
  • ✓Pages built with JavaScript frameworks that add classes later still work, because the script watches the page for new classes.

Option 2: build the CSS once and inline it

For a page that should look right on first paint with no outside requests, build only the classes the page uses into a stylesheet and paste it in:

  • ✓In an empty folder with your page.html, run npm init -y, then npm install tailwindcss @tailwindcss/cli.
  • ✓Create input.css with @import "tailwindcss"; and any @theme block the page used.
  • ✓Run npx @tailwindcss/cli -i input.css -o out.css --minify. Tailwind scans the folder for class names and writes only those rules.
  • ✓Delete the CDN script tag and the text/tailwindcss style block from page.html, and paste the contents of out.css into a <style> tag in the head.
  • ✓Tested with Tailwind 4.3.3: a page using five utility classes and one custom color built to a 4.8 KB stylesheet.

Upload it and send the link

Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account.

Turn on comments and reviewers can pin notes to parts of the page after typing a name. When the AI tool gives you a new version, upload it over the old one; the link stays the same: updating a shared link without changing it.

Related: why an AI page works in chat but breaks when hosted, sharing a Claude artifact and making an HTML file self-contained.

Frequently asked

Does a page that uses the Tailwind CDN work when hosted?

Yes. The CDN script runs in the reader's browser and builds the styles when the page loads, the same way it did on your computer.

Why does my Tailwind page look unstyled as an email attachment?

Email and chat apps usually block scripts in attachments, so the Tailwind script never runs. Open it from a link in a browser instead.

Should I remove the CDN script?

Only if the page must style instantly or work without outside requests. Build the CSS with the Tailwind CLI and inline it in a style tag.

Is it free?

Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free