Quotation marks

Quotation marks differ in style and usage, affecting punctuation placement. Use straight marks in writing and single marks in code examples. Double marks offset non-essential words.

There are differences between single quotation marks ( ' ) and double quotation marks ( " ), how to style them, and where to place punctuation that is used near a quotation mark.

Use logical quotation

When you place a keyword or other string literal within quotation marks, put punctuation, like commas and periods, outside of the final quotation mark. The following table shows an example of using logical quotation for commas and a period.

"" Do this "" Don't do this
Common terms include "event", "field", and "search head". Common terms include "event," "field," and "search head."

Use straight quotation marks

Use straight quotation marks instead of curly quotation marks when you write. In certain scenarios, especially in code examples, you must use straight quotation marks because curly quotation marks cause code to break. A better practice is to use straight quotes everywhere in your writing.

When to use single quotation marks

Use single quotation marks for code examples in languages that use the mark. See the following example:

SPLUNK_HOME = os.environ['SPLUNK_HOME']<br><br>
LOGGING_DEFAULT_CONFIG_FILE = os.path.join(SPLUNK_HOME, 'etc', 'log.cfg') 

When to use double quotation marks

Use double quotation marks to offset words that aren't part of the meaning of your sentence. See the following example:

"" Do this "" Don't do this
Search for "Query tables" on the Microsoft website. Search for query tables on the Microsoft website.

Don't use quotation marks for emphasis, to show user input in a Splunk product UI, or to enclose the names of UI elements.

For a full list of formatting rules for commonly documented elements, including the elements that take quotation marks, see Formatting reference.