Placeholder or Variable Text
Use placeholder text for a value when you:
Don't know its specific value
Don't or shouldn't use an example value
Use placeholders when demonstrating how a command or path should be constructed. Users supply the relevant value for the placeholder when using the command or syntax. When using placeholders, instruct users to replace the placeholders with the relevant values.
Placeholder text is also referred to as variable text or replaceable text.
Placeholder text usually indicates the type of element that's being represented. For example, directoryName would likely indicate the name of a directory.
Placeholder Text Guidelines
When creating placeholder text, use the following guidelines.
Note
To learn about showing placeholders for API resources, see API Placeholders.
Guidelines | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|
Use the As you can't apply text formatting to the code, enclose placeholders in punctuation that doesn't have any other special use in the code. Use a consistent convention throughout the documentation set per the programming language. |
| ||||||||
Use lowercase letters except when showing a multiple-word placeholder. To show a multiple-word placeholder:
NoteUse lowercase and camelCase unless you need to follow the conventions of the programming language. | password, eventTypeName, apiKey, hostId | ||||||||
Use one or more whole words to represent a placeholder.
| device; not dev installationDirectory; not installDir mode; not ######## (a series representing a number of digits) |
Placeholder Explanation Guidelines
When explaining a placeholder, use the following guidelines:
Guideline | Example | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Use a sentence to describe the placeholder parameter. |
port is the unique number for the | |||||||||||||||||||
Use a table if you need to explain two or more placeholders. This table should provide the parameter, data type, necessity (required, optional, or conditional), and a description of that parameter. |
| |||||||||||||||||||
Avoid standalone clauses that begin with where. |
where port is the unique number for the |