Format examples
To introduce an example in a sentence, use the guidance in the following table:
Guidance |
Recommended |
Not recommended |
At the end of a sentence, use a comma or an em dash. |
Enter a name for the instance, such as my-instance-99 .
Enter a name for the instance—for example, my-instance-99 .
|
Enter a name for the instance, for example, my-instance-99 .
Enter a name for the instance; for example, my-instance-99 .
Enter a name for the instance (for example, my-instance-99 ).
|
In the middle of a sentence, use parentheses if the example is short. Otherwise, rewrite
the sentence. |
Enter a six-digit hex number (for example, 228B22 ), and then click OK.
Enter a six-digit hex number, such as 228B22 , and then click
OK.
Enter a six-digit hex number, and then click OK. For example, if you want the color forest
green, enter 228B22 .
|
Enter a six-digit hex number (for example, if you want the color forest green, enter
228B22 ), and then click OK. |
For more information, see
Parentheses.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-15 UTC.
[null,null,["Last updated 2024-10-15 UTC."],[[["When introducing an example at the end of a sentence, use a comma or an em dash before the example."],["When introducing a short example in the middle of a sentence, use parentheses to enclose the example."],["For longer examples in the middle of a sentence, it's recommended to rewrite the sentence for better clarity, potentially placing the example at the end."],["Avoid using phrases like \"for example\" or semicolons before introducing examples within sentences."]]],[]]