cloudflare · Cloudflare Workers Docs
Workers Return small HTML page
Demonstrates how to return a basic HTML response by embedding an HTML string directly within a Cloudflare Worker script.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Return small HTML page
Demonstrates how to return a basic HTML response by embedding an HTML string directly within a Cloudflare Worker script.
When To Use
Use when you need to serve a simple HTML response directly from a Cloudflare Worker without using external storage or complex templating engines.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-return-html-small-page-workflow-guide.md | A markdown document demonstrating how to return a small HTML page from an HTML string within a Cloudflare Worker script. | Questions about a markdown document demonstrating how to return a small HTML page from an HTML string within a Cloudflare Worker script. |
examples/workers-examples-return-html-small-page-cloudflare-workers-return-html.text | A JavaScript code example demonstrating how to return a basic HTML response from a Cloudflare Worker using the fetch handler. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to return a basic HTML response from a Cloudflare Worker using the fetch... |
examples/workers-examples-return-html-small-page-cloudflare-workers-return-html-2.text | A Cloudflare Worker script that returns a basic HTML response with the correct content-type header. | Exact payloads, commands, or snippets shown in A Cloudflare Worker script that returns a basic HTML response with the correct content-type header. |
examples/workers-examples-return-html-small-page-cloudflare-workers-python-return.text | A Python implementation of a Cloudflare Worker that returns a basic HTML response using the WorkerEntrypoint class. | Exact payloads, commands, or snippets shown in A Python implementation of a Cloudflare Worker that returns a basic HTML response using the WorkerEntrypoint class. |
examples/workers-examples-return-html-small-page-cloudflare-workers-return-html-r.text | A Rust code example demonstrating how to use a Cloudflare Worker to return a small HTML response using the Response::from_html method. | Exact payloads, commands, or snippets shown in A Rust code example demonstrating how to use a Cloudflare Worker to return a small HTML response using the Response::... |
examples/workers-examples-return-html-small-page-cloudflare-workers-hono-return-h.text | A Cloudflare Worker using the Hono framework to serve a basic HTML response. | Exact payloads, commands, or snippets shown in A Cloudflare Worker using the Hono framework to serve a basic HTML response. |
What This Skill Covers
- Deliver an HTML page from an HTML string directly inside the Worker script.
- Main sections:
Tags.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/examples/return-html
