Cartaventa

Docs · Get started

HTML requirements

If you copy the prompts in these Docs, they already include all of these rules: you don’t need to read any of this. This page is for two moments: when you write your own prompt, and when an upload gets rejected and you need to understand the message.

A Cartaventa document is a single, self-contained .html file: the CSS and JavaScript live inside it, not in separate files. That’s how AI tools already generate these pages, but it helps to know where the walls are.

Your document opens inside a locked-down sandbox with no permissions of its own, so neither the document nor anyone tampering with it can touch your account, read your viewer’s session, or hide the footer. That sandbox is what makes sharing a private proposal safe, and it’s where every rule below comes from.

What works

What How
One file .html, UTF-8, 5 MB max once published. You can upload up to 25 MB: embedded images are compressed automatically when you publish.
CSS All inside a <style> tag in the document. Inline style="" works too.
JavaScript All inside a <script> tag in the document. Calculators, tabs, accordions, hand-drawn SVG or <canvas> charts: it all works.
Images Embedded as base64 (data:) is best. An image from a public URL also loads.
Fonts System fonts work great. For a Google Font, load it with @font-face inside your <style>, pointing at the font file.
Links They work and open in a new tab. Anchor links (href="#pricing") scroll within the document, so a table of contents works fine.
Printing Add @media print so your viewer can print it cleanly from the browser menu.

What doesn’t

None of this is arbitrary: each item is a wall of the sandbox, and the result is always the same. It looks fine in your AI’s preview and breaks in Cartaventa. Tell your AI before it generates, not after. Each item includes, in italics, the line to send your AI when it’s already made the mistake.

  • No <script src="https://…">. A library is a ready-made piece of code your AI pulls in from another website instead of writing it; a CDN is the website it pulls it from. Every library from a CDN is blocked: Chart.js, Tailwind via CDN, jQuery, Alpine, anything. For a chart, draw it by hand with SVG or <canvas>. For styling, write the CSS in the document. “Remove the external library and write that code by hand inside the document: I can’t load anything from a CDN.”
  • No <link rel="stylesheet" href="https://…">. Same thing, including the Google Fonts stylesheet. “Move all the CSS into a <style> tag inside the document and use system fonts.”
  • No iframes or embedded video. An iframe is a window into another website placed inside your page: it’s how a YouTube video gets embedded. YouTube, Vimeo, Loom, Calendly, and Google Maps won’t load. Use a link with a good thumbnail; it opens in a new tab, where the video plays normally. “Replace the iframe with a regular link and a clickable thumbnail.”
  • No forms that submit data. There’s nowhere to send it. For replies, use a mailto: link or a WhatsApp link. “Remove the form and use a mailto: link with the subject line already filled in.”
  • No localStorage, sessionStorage, or cookies. They’re the browser’s memory, where a page saves what you did for next time. The document has nowhere to store anything: those calls don’t just fail to save, they throw and take the rest of your JavaScript down with them unless they’re inside a try. Whatever the viewer changes in a calculator lives in memory while the page is open, and that’s fine. “Remove all localStorage and sessionStorage calls: keep the state in JavaScript variables.”
  • No alert(), confirm(), prompt(), or window.print() from a button. They’re blocked. Show messages on the page instead. “Replace the alert() calls with a message shown on the page.”
  • No password, credit card, bank account, or PIN fields. A document with them is not published: that rule keeps Cartaventa from being used for phishing. “Remove any password or payment fields; that document would be rejected.”
  • No “Download PDF” buttons. The document can’t create downloads. PDF download is coming to the Cartaventa footer, not your HTML. “Remove the download button; the document can’t generate files.”

Two layout details

  • The Cartaventa footer sits at the bottom, outside your document (56 px on desktop, 76 px on mobile). Your document gets the rest of the screen with its own scroll, so 100vh inside it means your space and never slides under the footer.
  • Mobile first. Most proposals are opened for the first time on a phone, in a parking lot, right before a meeting. If your AI gives you three fixed columns side by side, ask it to stack them.

The block to paste into your AI

What it’s for and what you do with it:

  1. You don’t need it if you copy a prompt from these Docs: all of them already include it. This block is for when you write your own prompt.
  2. When you write your own (“build me a proposal for Acme Corp. from what I’m pasting here”), copy the block below and paste it at the end, after your instructions, before you send the message.
  3. If the conversation runs long and your AI starts slipping libraries or iframes back in, paste it again. That’s normal: it forgets.

If pasting blocks isn’t your thing, there’s an easier route: let your AI read all the Docs and take care of it.

FILE REQUIREMENTS (mandatory, no exceptions):
- Give me ONE self-contained .html file, UTF-8, under 5 MB.
- All CSS goes in a <style> tag inside the document. No <link> to external stylesheets.
- All JavaScript goes in a <script> tag inside the document. No <script src="..."> to a CDN or any URL: no external libraries are available (no Chart.js, Tailwind CDN, jQuery, Alpine, React).
- If you need charts, draw them by hand with SVG or <canvas>.
- No iframes or embedded video (YouTube, Vimeo, Loom, Calendly, Maps). Use a regular link instead.
- No forms that submit data. For contact, use mailto: or a WhatsApp link.
- No localStorage, sessionStorage or document.cookie: the document runs on an isolated origin and those calls throw. Keep state in JavaScript variables.
- No alert(), confirm(), prompt() or window.print(): they are blocked. Show messages on the page.
- No password, credit card, bank account, CVV or PIN fields: the document would be rejected when published.
- No "Download PDF" buttons: the document can't create downloads.
- System fonts. If you use a web font, embed it with @font-face inside the <style>.
- Images embedded as base64 (data:) or none. No logos pulled from a URL that could change tomorrow.
- Mobile first: on a 390 px wide screen it must be readable without zooming or horizontal scrolling.
- It must print well: include a basic @media print.
- Keep the document in the language of its content, and set <html lang> to match (lang="en" for English).

How to check it

  1. Open the file in your browser with a double-click. If it already looks wrong there, don’t upload it.
  2. Upload it and click Preview in the document’s Details. That view doesn’t count as a viewer visit.
  3. Make sure buttons and calculators respond inside Cartaventa, not just in your AI’s preview. That’s where stray localStorage calls and CDNs show up.
  4. Open it on your phone with your own link before you send it to anyone.

What’s next

The prompts if you don’t have the file yet, or Upload and publish a document if you already do.

Next guide How to use these prompts →

Something missing from this guide? Message us on WhatsApp and we’ll fix it. You can also read it in Markdown, ready to paste into your AI, at /en/docs/html-requirements.md.