Text formatting Edit

Highlight: Maintain consistent type and text formatting.

Consistent text formatting and type treatment is a principal factor in great documentation and design. The intuitive use of text formatting, color combinations, alignment, spacing, and punctuation enables simplicity and improves readability for the reader.

Formatting text uniformly by utilizing distinct design and structures such as that in headings, tables, lists, URLs, and code examples helps distinguish information easily, while also making it easier for scannable and accessible documentation.

Text highlighting

Text can be highlighted to distinguish itself from other text using the following text-formatting conventions:

Bold
Use bold formatting, <b> in HTML or ** in Markdown for UI elements and at the beginning of notices.

Although a double underscore (__) can be used for bold formatting in Markdown, it can be difficult to distinguish in a text editor. Preferably, use double asterisks (**) for bold formatting in Markdown.

Italic
Use italic formatting, <i> in HTML or _ in Markdown, when drawing attention to a specific word or phrase, such as when defining or introducing key terms or using words as words. You can also use a single asterisk (*) for italic formatting in Markdown.

Underline
Do not underline.

Strikethrough
Do not use strikethrough.

Code text
Use <code> in HTML or ` in Markdown to apply a monospace font and other styling to code in text, inline code, and user input.

Use <pre> in HTML or ``` in Markdown for code examples or other blocks of code.

Do not override or modify font styles inline.

Quotation marks
Use quotation marks in the American (US) English style.

Capitalization
Use standard American (US) English capitalization rules. Use sentence-case capitalization in headings, titles, and other content.

Font
Don’t override global styles for font type, size, or color.

Top ↑

Using type

Clear, legible, as well as aesthetically pleasing typography is one of the primary features in visually appealing content.

  • In general, use sentence-case capitalization and avoid other forms of capitalization such as all-uppercase, all-lowercase, or title case.
    For more information, see Capitalization.
  • Use left alignment for text. This ensures an even left margin with a irregular right margin- improving document structure.
  • Avoid center-aligned text.
  • Ensure adequate and consistent line spacing – which is the amount of vertical space between two lines of text in a text body. If your site’s design determines the line spacing, don’t change it. Don’t reduce line spacing to fit more text or content; rewrite or edit the text instead.

For more information, see Capitalization, Headings and titles, Procedures and instructions, Code examples, and UI elements.

Top ↑

Formatting common text elements

Text element Convention Example
Code and console output Use code text. See Code in text. alt="The WordPress mascot Wapuu."
Company-, product-, brand-names, and trademarks Title-style capitalization is generally used if there are two or more proper nouns. See Trademarks. WordPress

WordCamp Central

Emphasis Sometimes it’s acceptable to use italic text for emphasis. Use the 24-hour format only when absolutely needed.
Error messages Use sentence-style capitalization. Enclose in quotation marks when referencing error messages in text. Error Code 345. Do you want to continue?
If you see the error message, “Executable not found.” quit and restart the terminal.
Filename extensions All lowercase. See Filenames .css
.php
Filenames All lowercase. See Filenames. new-cache.php
wp-settings-1.php
Key terms Italicize the first mention of a new term. See Key terms. An administrator’s tool of sorts, phpMyAdmin is a PHP script meant for giving users the ability to interact with their MySQL databases.
Markup language elements (tags) Use bold text in code font. Capitalization varies. <link>
<!DOCTYPE html>
Mathematical constants and variables Use italics. x/y + z = 4
Placeholder variables Use italicized code text. See Placeholders. EMAIL_ADDRESS
PHONE_NUMBER
Titles of books, movies, articles, posts, papers, and other full-length works Use italics. See Cross-references. The Gutenberg Block Editor Guide
WordPress 5.6 “Simone”
Getting started with WordPress hooks: Introduction
UI elements or strings Use sentence-case capitalization. Navigate to page 4.
Copy the selected items.
URLs Use lowercase capitalization for complete URLs. If necessary, line-break long URLs before a slash. Don’t hyphenate.
See Link text.
wordpress.org
Version variables Use italics for the variable. Version 5.6.x

Top ↑

Spaces between sentences

Leave only one space between sentences; that is, leave only one space between the sentence-ending punctuation and the first character of the next sentence.

Last updated: