Cloudflare Docs
Style Guide
Style Guide
Visit Style Guide on GitHub
Set theme to dark (⇧+D)

Code conventions and format

Use the conventions described below throughout Cloudflare product content.

​​ Angle brackets ( < and > )

Use angle brackets as a placeholder for variables you want the user to enter (except in URLs, where you should use curly braces for placeholders).


Type your user-specified domain in this format: https://<user-specified domain>

"description": "<RULE_DESCRIPTION>"

Angle brackets that contain numbers separated by an ellipsis represent a range of values associated with a bit or single name - for example, AO <0…3>.

​​ Square brackets ( [ and ] )

Square brackets enclose optional items.


Specify a subsearch that starts with this search command: tag=dns query [search tag=malware].

​​ Curly braces ( { and } )

Use curly braces in the following situations, such as:

When they are part of a code sample or other string literal, such as in placeholders inside a URL.


​​ >

The > symbol leads you through nested menu items and dialog box options to a final action. The sequence Options > Settings > General directs you to pull down the Options menu, select the Settings item, and select General from the last dialog box. Do not use bold formatting for the > symbol.

​​ Tip icon

This icon denotes a tip, which alerts you to advisory information.

​​ Note icon

This icon denotes a note, which alerts you to important information.

​​ Info icon

This icon denotes info, which alerts you to important information.

​​ Notice icon

This icon denotes a notice, which alerts you to take precautions to avoid data loss, loss of signal integrity, or degradation of performance.

​​ Caution icon

This icon denotes a caution, which advises you to take precautions to avoid injury.

​​ Blue text

Text in this color indicates a link.

​​ Bold

Use bold when referring to a clickable action or to highlight a title or name in the UI. Bold text denotes items that you must select or click in the software, identifiers in the UI, or parameter names.

Do not use bold for programs.

In nested menus, use bold for the word not the symbol.

Example: Dashboard > This > That

​​ Italics

Use italics when referring to an option that customers can select from, like in dropdown menus.

Do not use italics when referring to the state of a toggle - for example, enabled/disabled should not be italicized.

​​ Monospace

`text in between backticks`

Text in this font denotes text or characters that you should enter from the keyboard, sections of code, programming examples, and syntax examples. This font is also used for the proper names of drives, paths, directories, programs, subprograms, devices, functions, operations, variables, files, API commands, and extensions.

​​ Examples of elements we monospace

  • IP addresses and ranges. Example: Change your system + DNS servers to use
  • Port numbers. Example: Requests are redirected through the HTTP service (port 80).
  • API commands: Example: The endpoint supports GET for JSON format.
  • Commands. Example: Run the command wrangler login.
  • Attribute names and values. Example: type, name
  • Class names. Example: button-primary
  • Command-line utility names. Example: wrangler, npm, node, cloudflared
  • Data types (string, number, int64).
  • Defined (constant) values for an element or attribute. Example: <A_BINDING_NAME>
  • DNS record types. Example: The bot will default to looking for A records. A, CNAME
  • Enum (enumerator) names (this depends on the language).
  • Environment variable names. Example: <A_BINDING_NAME>
  • Element names (XML and HTML). Example: <div>, <form>, <input>, <code>
  • Place angle brackets (<>) around the element name; you might have to escape the angle brackets to make them appear in the document.
  • Filenames, filename extensions (if used), and paths. Example: wrangler.toml
  • Folders and directories. Example: functions, wrangler.toml
  • HTTP verbs. Example: POST, GET, HEAD, PUT,DELETE
  • HTTP status codes. Example: 400, 200, 500
  • HTTP content-type values. Example: text/html, application/javascript; charset=utf-8
  • HTTP header names. Example: Content-Length
  • URLs that are used as input or output in commands and code, such as in the following example:
  • IAM role names. Example: roles/storage.admin
  • Language keywords. Example: in, await
  • Method and function names. Example: handleRequest
  • Namespace aliases. Example: something like Python would be numpy, this is language dependent
  • Placeholder variables. Example: 2xx for HTTP status codes or <YOUR_BUILD_DIR> for input values
  • Query parameter names and values. Example: /api/v4/{account_id}, account_id is the query/route parameter name
  • Text input. Example: "Hello Worker"