Text style and formatting

Learn how to format names and other types of non-standard text.



Note

For more information about how to deal with code samples, check the examples section.

An exhaustive list of use cases for the code font is available in the Google Dev Style Guide (opens new window).

# Paths and directories

Use the inline code style for paths and directories. Make them lowercase and use forward slashes (/) where applicable. When possible, separate words in a path or directory using hyphens. Otherwise, follow the original separator.

👍 Correct

/directory/subdirectory/awesome-file.md

👎 Don't use

\Directory\SubDirectory\Awesome_File.md

# File names

When possible, write file names lowercase and use hypens to separate words instead of underscores. Otherwise, follow the original capitalization of the file.

Use only standard ASCII alphanumeric characters in file and directory names.

👍 Correct

my-awesomefile.md

👎 Don't use

My_Awesomefile.md

# File types

When referring to a file type, use the common name of the file type, or its condensed name, all caps. Avoid referring to the file type using its extension.

Don't use special formatting for file types.

👍 Correct

A PNG file

A Bash file

👎 Don't use

A .png file

A .png file

An .sh file

# HTTP calls

Use inline code when referring to HTTP calls. They're still technical keywords that deserve being treated as ones. This means not creating verbs from them.

👍 Correct

Send a GET request.

👎 Don't use

GET the data.

GET the data.

Last Updated: 11/18/2020, 7:25:08 AM