---
description: Write effective examples in documentation.
title: Examples
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/style-guide/llms.txt  
> Use this file to discover all available pages before exploring further.

# Examples

Last updated Aug 24, 2026|Copy as Markdown|[View as Markdown](https://e8aee267.previews.developers.cloudflare.com/style-guide/documentation-content-strategy/component-attributes/examples/index.md)|[Agent setup](https://e8aee267.previews.developers.cloudflare.com/agent-setup/)

## Definition

A code sample or line of text that shows the specific structure of a request/response, input/output, or value for UI/API elements

Note

If you are unsure about when to categorize something as an example or tutorial, remember:

Examples are a component attribute and are typically a snippet of code a user might copy and paste to run a task. Examples should not have multiple steps. A tutorial might contain an example, but an example will not contain a tutorial.

Tutorials are a content type, typically longer form, and contain multiple steps to help users connect products to real-world scenarios.

## Used in

[Tutorial](https://e8aee267.previews.developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/tutorial/), [How to](https://e8aee267.previews.developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/how-to/), [Reference](https://e8aee267.previews.developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/reference/)

## Structure

**Context**

Explain what the code sample does in a short sentence.

**Code blocks or snippets**

These could include:

* Example requests and responses
* Example inputs and outputs
* Field values for UI and/or API

## Additional information

[Code block guidelines](https://e8aee267.previews.developers.cloudflare.com/style-guide/style-and-grammar/formatting/code-block-guidelines/)

## Requests/feedback

[https://github.com/cloudflare/cloudflare-docs/issues/150 ↗](https://github.com/cloudflare/cloudflare-docs/issues/150)

Was this helpful?

YesNo

## On this page

[![](https://e8aee267.previews.developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://e8aee267.previews.developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/style-guide/documentation-content-strategy/component-attributes/examples/#page","headline":"Examples · Cloudflare Style Guide","description":"Write effective examples in documentation.","url":"https://developers.cloudflare.com/style-guide/documentation-content-strategy/component-attributes/examples/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-08-24","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
