Text-formatting summary

The page summarizes, and provides a quick reference for, many of the general text-formatting conventions covered elsewhere in the style guide. For more information, see Visual formatting.

Bold
Use bold formatting, <b> or **, for UI elements and at the beginning of notices.
Although a double underscore, __, can also indicate bold styling in Markdown, it can be difficult to distinguish in a text editor. It's best to use the double asterisk for bold in Markdown.
Italic
Use italics formatting, <i> or _, when drawing attention to a specific word or phrase, such as when defining terms or using words as words.
Although an asterisk, *, can also indicate italics in Markdown, we recommend underscores to make it easier for humans to distinguish italics from bold in the Markdown file.
Italicize titles of books, movies, web series, and other full-length works, unless they're part of a link. For more information, see cross-references.
Italicize parameter names. For example, when you refer to the parameters of a method like doSomething(Uri data, int count), italicize data and count.
Italicize mathematical variables and version variables. For example, x + y = 3, version 1.4.x.
To indicate semantic emphasis in HTML, use the <em> element, which renders as italics in most contexts. To indicate emphasis in Markdown, use underscores (_), which render as italics; you can't do semantic tagging in Markdown.
Underline
Do not underline.
Code font
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 code blocks, <pre> or ```, for code samples or other blocks of code.
Do not override or modify font styles inline.
Use code font to mark up code, such as filenames, class names, method names, HTTP status codes, console output, and placeholders. For more information, see Some specific items to put in code font.
Capitalization
Use American English style for general capitalization.
Use sentence case in all headings, titles, and navigation.
Use all-capitals for placeholders.
Quotation marks
In general, use American English style when punctuating quotations.
For titles of shorter works—such as articles or episodes in a web series—put titles in quotation marks, unless they're part of a link.
Font type, size, and color
Do not override global styles for font type, size, or color.
Use semantic HTML to control the style of text on a page. For example, use code tags, <code> or `, instead of manually styling text with a monospace font.
Other punctuation conventions
Don't use ampersands (&) as conjunctions or shorthand for and. Use and instead. That includes headings and navigation. Exception: It's okay to use & in cases where you need to refer to a UI element or the name of a menu that uses &.
Put quotation marks and end punctuation outside of link text.
https://developers.google.com/style/text-formatting?authuser=1
developers.google.com
CC-MAIN-2023-23
88756
application/http; msgtype=response
sha1:HTWBLOBADHXM4SGTJKDMEZ6OR5OFJVH7
<urn:uuid:e5cd7a45-2825-4c05-a792-e1d1e5455c8c>
2023-05-28T11:29:12Z
142.251.16.113
text/html
sha1:VY25ZYNIIVJFQBOMWGDWL62ACWV7CEDT
<urn:uuid:0d4d9aed-923b-4f98-9579-06fbf9259d08>
https://developers.google.com/style/text-formatting?authuser=1
response
<urn:uuid:e0e35af6-73f4-491b-9968-3aa1cea3cd67>
isPartOf: CC-MAIN-2023-23
publisher: Common Crawl
description: Wide crawl of the web for May/June 2023
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-163
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/