Consistent text formatting helps users locate and interpret information easily. The following guidelines present some specific conventions for elements that are not part of the user interface. Use these document conventions both in procedures and in regular text. For the document conventions for user interface elements, see User interface formatting (Chapter 5).
When capitalization style is to follow that of the user interface, consider making an exception for labels in the interface that are all lowercase or all uppercase: Title capitalization is recommended in these instances.
Some elements may not appear here. Consult your project style sheet.
Element | Convention | Example |
---|---|---|
Bold. Capitalization varies. | IfOutputPrecision | |
Title capitalization. Italic. | See Visual Basic Custom Control Reference. | |
Usually title capitalization. Enclose in quotation marks. | See Chapter 9, “Extending Forms.” | |
Bold. Capitalization varies. |
| |
Classes (user-defined) | Capitalization varies. See also Code examples | BlueTimerControl |
Code samples, including keywords and variables within text and as separate paragraphs, and user- defined program elements within text | Monospace. See also Code examples | #include <iostream.h> void main () |
All lowercase. Bold. | copy command /a option | |
Usually bold. Capitalization varies. Treatment of constants may vary, so always refer to your project style sheet. |
| |
All uppercase. | EDIT control class | |
All uppercase. | CF_DIB | |
Bold. Capitalization varies. |
| |
Bold. Capitalization follows that of the application programming interface. |
| |
Bold. Treatment of database names may vary, so always refer to your project style sheet. | WingtipToys database | |
All uppercase. | LPT1 COM1 | |
Dialog box titles | Bold. Title capitalization. | Protect Document dialog box Import/Export Setup dialog box |
Bold. | #include #define | |
All uppercase. | INCLUDE SESSION_SIGNON | |
Error message names | Sentence-style capitalization. | Access denied |
Bold. Treatment of event names may vary, so always consult your project style sheet. | In the OnClick event procedure… | |
Bold. Treatment may vary, so always consult your project style sheet. |
| |
All lowercase. | .mdb .doc | |
File names (user-defined examples) | Bold in procedures if the user must click or type the name as shown. Title capitalization. All right to use internal caps in file names for readability. | My Taxes for 2011 MyTaxesFor2011 |
Bold in procedures if the user is expected to click or type the name as shown. Title capitalization. All right to use internal caps in folder and directory names for readability. | Vacation and Sick Pay MyFilesAccountingPayrollVacPay | |
Usually bold. Capitalization varies. Treatment may vary, so always consult your project style sheet. |
| |
Title capitalization. Italic. | Halo: Reach Kinect Adventures! | |
All uppercase. |
| |
Initial caps. | Ctrl, Tab Ctrl+Alt+Del Shift, F7 Alt, F, O Spacebar | |
Keywords (language and operating system) | Bold. Capitalization follows that of the application programming interface. |
|
All uppercase. Bold. | AND XOR | |
Usually all uppercase. Bold if predefined. May be monospace if user-defined. Treatment may vary, so always consult your project style sheet. |
| |
Bold. Case varies. |
| |
Italic. | a2 + b2 = c2 | |
Bold. Capitalization varies. |
| |
Bold. Capitalization varies. |
| |
Italic on first mention of a new term, unless your project style sheet specifies otherwise. Use italic formatting for emphasis sparingly. | Microsoft Exchange consists of both server and client components. You must close the window before you exit. | |
Operators | Bold. | +, -
|
Options (command-line) | Bold. Case exactly as it must be typed. | copy command /a option /Aw |
Parameters | Italic. Capitalization varies. |
|
Placeholders (in syntax and in user input) | Italic. | /v: version Type password. |
Programs, including utility and accessory programs | Usually title capitalization. Check the Microsoft trademark list for other styles of capitalization. | Microsoft Word Notepad Network Connections Nmake |
Properties | Usually bold. Capitalization varies. Treatment may vary, so always consult your project style sheet. |
|
All uppercase. | DS | |
Subtrees (first-level items) are all uppercase. Separated by underscores. Usually bold. Registry keys (second-level items) follow the capitalization of the user interface. Registry subkeys (below the second level) follow the capitalization of the user interface. Treatment may vary, so always consult your project style sheet. | HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE SOFTWARE ApplicationIdentifier Microsoft | |
All words capitalized (per industry standard). | You Are The Sunshine Of My Life Sittin’ On The Dock Of The Bay | |
Bold. Case varies. |
| |
Sentence-style capitalization. Enclosed in quotation marks. | “Now is the time” | |
Usually bold. Case varies. |
| |
Usually lowercase. Bold. |
| |
All uppercase. | SC_HOTLIST | |
URLs | All lowercase for fully specified URLs. If necessary, break long URLs before a forward slash. Do not hyphenate. See also URLs, addresses (Chapter 7). |
seattle.sidewalk.com /music/ |
Usually lowercase, unless case sensitive. Bold or italic, depending on element. If the user input string contains placeholder text, use italic for that text. | Type hello world Type -p password | |
Usually title capitalization. | Makefile RC Program | |
All uppercase. | DIB_PAL_COLORS | |
Treatment may vary, so always consult your project style sheet. |
| |
Bold. Case varies. | ElementType element Xml:space attribute |
For more information, see Capitalization (Chapter 7); Command syntax; File names and extensions; Fonts (Chapter 3); HTML tag, element, and attribute formatting; Key names (Chapter 5); Ribbons, Menus, and toolbars (Chapter 5); User interface formatting (Chapter 5); XML tag, element, and attribute formatting.
3.145.169.109