This page describes how to format phone numbers in technical documentation.
Format phone numbers in HTML or Markdown
To ensure that a phone number is displayed on the same line, use a nonbreaking space
) and nonbreaking hyphen (
‑) where appropriate
in HTML or Markdown.
Format example phone numbers
Most phone numbers in our documentation are examples. To show an example phone number, use a US number in the range (800) 555‑0100 through (800) 555‑0199. That range is reserved for use in examples and in fiction.
Recommended: (800) 555‑0175
Never use a real phone number in examples.
Format North American phone numbers
To format a real phone number in the US, Canada, and other NANP (North American Numbering Plan) countries, enclose the area code in parentheses, and then hyphenate the three-digit exchange code with the four-digit number.
Recommended: (415) 555‑0132
Format international phone numbers
To format a real phone number in non-NANP countries, include the country and area codes. Insert a plus sign immediately before the country code (no space); the plus sign stands in for a prefix known as an exit code, which lets you dial out of a country. Each country has a different exit code.
For more information, see the ITU document about standardized formatting for phone numbers.
Recommended: +1 (415) 555‑0132
Format phone numbers that include an extension
To specify a phone extension, follow the phone number with the word extension, and then specify the extension number.
Recommended: (415) 555‑0132, extension 987