Punctuation
Picks one convention for each punctuation mark, from the serial comma to the Latin abbreviation, so the choice never has to be made twice.
Punctuation is the part of a style guide that gets argued about most and matters least per instance. No reader misunderstands a sentence because of a missing serial comma. But a reader who meets three comma habits on one page stops trusting the page. The rules below settle each mark once.
Where two conventions both work, the stock guide takes the one that is easier to apply and harder to get wrong. That is why it prefers a period to a semicolon and a comma to a dash.
Commas and spacing
Serial comma
Use the serial comma. Put a comma before the final “and” or “or” in a series of three or more. Without it, the last two items can read as a single item.
One space after a period
Put one space after a period. The same goes for every other mark that ends a sentence. Two spaces were a typewriter habit.
Comma after an opening element
Put a comma after a clause or phrase that opens a sentence ahead of its subject. The comma marks where the setup ends and the sentence proper begins, so the reader never has to back up. Use it after every opening element, short ones included: a rule that depends on length gets applied two ways on one page. The exceptions are “and,” “but,” “or,” “so,” and “then,” which open a sentence with no comma after them.
No comma splices
Never join two sentences with a comma alone. Two independent clauses, each with its own subject and verb and each able to stand alone, need a period between them, or a comma followed by “and,” “but,” “or,” “so,” or “yet.” A comma by itself is a comma splice, and the reader takes it for a list until the second verb arrives. When two verbs share one subject there is only one clause, and no comma goes before the “and.”
Commas around nonessential words
Set off a nonessential phrase or appositive with a pair of commas, and give an essential one none. A phrase is nonessential when the sentence still names the same thing without it: in “Dana Okafor, our support lead, replied,” the middle can go, so it takes a comma on each side. A phrase that tells the reader which one you mean is essential and takes no commas: “the support lead Dana Okafor.” The closing comma is the one writers drop; a phrase in the middle of a sentence needs both. A name in direct address takes the same pair (“Thanks, Priya, for the report”), and a closing “too” or “either” takes none. Clauses that open with “that” or “which” follow term-that-which.
Commas in dates, places, and names
In a full date or a place with its region, put a comma after the year or the region too when the sentence goes on. The year in “September 15, 2026” and the province in “Calgary, Alberta” are set off like any aside, so the comma that opens them needs one to close them. A weekday before a date is set off the same way (“Tuesday, September 15, 2026,”). A month and year alone take no comma (“September 2026”). Don’t put a comma before a generational suffix such as “Jr” or “III”: “Sam Lee Jr” reads as one name, and commas around the suffix leave the reader matching pairs. A legal suffix such as “Inc.” appears only where name-legal-suffix calls for it, punctuated exactly as registered.
Commas between adjectives
Put a comma between two adjectives that each describe the noun on their own, and none when the first describes the rest of the phrase. Test it by putting “and” between them or swapping their order. If the sentence still reads naturally, the adjectives are coordinate and take a comma: “a short, clear summary.” If it doesn’t, the first adjective modifies the phrase that follows and takes no comma: “a new pricing plan,” since nobody writes “a pricing new plan.” Never put a comma between the last adjective and its noun.
Non-breaking spaces
Use a non-breaking space where a line break would split a number from what it counts. That means between a number and its unit (10 GB), between a time and “a.m.” or “p.m.,” and between a short locator and its number (“p. 12,” “no. 4”). A reader who meets “10” at the end of one line and “GB” at the start of the next has to put them back together. In HTML and Markdown, type the character itself or write . Where a format can’t carry it, such as plain-text email, an ordinary space is fine.
The archive holds 10 GB of logs.The archive holds 10 GB of logs.Dashes
The stock flags the em dash at avoid, the slop guard’s tier for it, and an organization can move it to never. This guide never prints the character, even as a bad example.
Em dash
Don’t use an em dash. Use a comma, a colon, or a spaced en dash instead. Two hyphens standing in for a dash count as an em dash. To attach a clause, use a comma. To introduce an explanation, use a colon. To set off an interruption, use an en dash with a space on each side (“the build failed – the log explains why”): the spaced en dash is the guide’s replacement for the em dash, and the only dash it takes inside a sentence. A sentence that needs a dash to hold together usually wants to be two sentences. In a reference list, repeat an author’s name in each entry instead of the run of dashes some citation styles use; cite-repeat-author sets that out. Because this guide never prints the em dash, the bad example shows two hyphens where it would be.
En dash for ranges
Use an en dash, never a hyphen, for a range written with a dash. The en dash means “to”; a hyphen joins words. A dash range belongs in tables and interface text; in prose, write “2019 to 2024,” as Numbers, dates, and units requires. The example pair below is a table cell.
No 2-em, 3-em, or joining dashes
Never use a 2-em or 3-em dash, and never use an en dash to join a word to an open compound. The guide has three marks of this kind: the hyphen, the en dash for a range, and the spaced en dash for an interruption. Where some styles print a long dash for a letter or name left out, write words that say what is missing (“a board member who asked not to be named”). Where they print a run of dashes for a repeated author in a reference list, repeat the name, as cite-repeat-author sets out. Where they join a prefix to a two-word name with an en dash, rewrite so the name stands alone. The first bad example shows hyphens where the long dash would be.
Exclamation marks
Exclamation marks
Don’t use exclamation marks outside marketing copy. In documentation and interface text the mark reads as alarm or as forced cheer, and neither helps the reader. Marketing copy may carry one it has earned. A name or title that contains one keeps it, as punct-question-exclamation says.
Question marks
Question marks
End a direct question with a question mark and an indirect question with a period. “Which plan fits?” asks; “customers ask which plan fits” reports a question, and a question mark after it reads as doubt. Unlike a period or comma, a question mark goes inside the closing quotation mark only when the quoted words are the question; when the whole sentence asks, it goes outside. A question mark or exclamation mark that belongs to a title or a name stays as published, in any kind of content, and takes the place of the period or comma that would fall at the same point, as punct-multiple-marks says.
Quotation marks
Quotation marks
Use double quotes, with the period inside unless the quote is a literal string. Single quotes are only for a quote inside a quote. In ordinary prose, a period or comma goes inside the closing quotation mark. When the quoted text is a value the reader must type or match exactly, put the period outside so the string stays exact, or, better, put the value in a code span and drop the quotes. Under the British spelling variant, a period or comma goes inside the quotation marks only when it belongs to the quotation, as quote-other-marks sets out.
config.yaml.Curly quotes and apostrophes
Use curly quotation marks and apostrophes in prose, and straight ones (" and ') only in code. Curly marks are the typeset form, and a page that mixes the two looks pasted together. An apostrophe that stands for missing letters or digits is always the closing mark (’), even at the start of a word, as in “the class of ’98” and “rock ’n’ roll.” Autocorrect turns a leading apostrophe into an opening mark (‘), which points the wrong way; check every one. In prose, prefer the full form (“the 1990s”) to the shortened one.
The team calls it "quiet week" because nobody's on call.Colons and semicolons
Lowercase after a colon
After a colon, start with a lowercase letter. A colon introduces a list, an example, or an explanation, and the words after it continue the sentence, so they start in lowercase even when they could stand alone as a sentence. Keep the capital on a word that always has one, such as a proper noun, and on the first word of a quotation. Text that follows one of this guide’s set labels starts a sentence of its own and keeps its capital: the label of a note, caution, or warning, “Optional:” at the start of a step, and the term that opens a reference or glossary entry.
Periods over semicolons
Prefer a period to a semicolon. A semicolon joins two sentences that could have stood apart. Keep one only where a period would break a thought in half, or between list items that already contain commas.
Semicolons in a complex series
When any item in a series contains a comma, separate every item with a semicolon. Commas inside the items and commas between them can’t do both jobs, and the reader loses count of the items. Keep a semicolon before the final “and,” as the serial comma would be kept. This is the use punct-semicolon allows; when the series runs past three items or the items are long, a vertical list reads better, as Lists says.
Parentheses, apostrophes, and symbols
A parenthesis holds an aside the sentence would survive without, such as a unit conversion or a short example. If the sentence loses meaning when you delete the parenthetical, the words belong in the sentence.
Write “and” and “or” as words. An ampersand belongs only in a product or company name that uses one, so a menu labeled “Settings & Billing” becomes “Settings and billing.” Never write “and/or”; the slash hides which case you mean. Spell out the alternatives, usually with “or both,” as in “export the report, the raw log, or both.”
Punctuation with parentheses
Put a period inside the parentheses only when a whole sentence is inside them; otherwise the sentence’s own punctuation goes after the closing parenthesis. A parenthetical inside a sentence takes no capital and no period of its own, even when it could stand alone. A comma the sentence needs goes after the closing parenthesis, never before the opening one. A parenthetical that is a sentence by itself starts with a capital and ends with its period inside. Don’t put parentheses inside parentheses: rewrite, or move the inner aside into the sentence.
Square brackets
Use square brackets for words you add inside a quotation and in code that uses them, and for nothing else in prose. Brackets tell the reader that the words inside are yours, not the speaker’s or the source’s; quote-brackets says when an insertion is allowed. Don’t use brackets for an ordinary aside. An aside inside parentheses takes brackets only when a rewrite can’t remove the nesting, and a rewrite almost always can. Placeholders in code use angle brackets, as Code and technical terms says.
Slashes
Don’t put a slash between words in prose; write “or” or “and,” whichever you mean. A slash between two words hides whether the reader gets one, the other, or both, which is the same problem as “and/or.” A slash stays only where it belongs to the form: a file path, a URL, a unit such as km/h, and a term the terminology list spells with one. Never put a space on either side of it.
Ellipses
Use an ellipsis only to mark words left out of a quotation or speech trailing off in a transcript, and write it as the single character (…). The single character keeps its dots together at a line break and spaces them evenly; three typed periods can split across lines. Where it stands for words left out inside a sentence, put a space on each side of it. quote-ellipsis covers where an omission is allowed and how to mark one that crosses the end of a sentence. Don’t use an ellipsis to trail off, to build suspense, or to hint that there is more: say what comes next, or stop.
Apostrophes and plurals
Use an apostrophe for possession, never for a plural. Abbreviations and numbers take a plain “s.” The apostrophe form is an error. A lowercase single letter is the one exception (“dot the i’s”), as gram-plurals sets out.
Possessive forms
Add ’s to make any singular noun possessive, including a name that ends in s, and add the apostrophe alone to a plural that ends in s. “The bus’s route,” “Ines Morales’s report,” and “Chris’s team” all take ’s: one rule is easier to apply than exceptions decided by sound. A plural that ends in s takes the apostrophe alone (“the users’ settings”), and a plural that doesn’t takes ’s (“children’s,” “people’s”). An organization whose name is plural in form, such as Northwind Traders, takes the apostrophe alone. When two people own one thing, put ’s on the last name only (“Ana and Sam’s proposal”); when each owns their own, put it on both (“Ana’s and Sam’s proposals”). In a descriptive phrase, use the plain noun instead of a possessive: “user guide,” “visitor center.”
Possessives of organizations and abbreviations
Make an organization or an abbreviation possessive with ’s, like any singular noun, and leave the apostrophe off a noun that only describes. “The council’s decision” and “the CEO’s letter” follow punct-possessive-forms; a plural abbreviation takes the apostrophe after its s (“the CEOs’ letters”). A product name takes no possessive at all: glob-no-product-possessive makes it an adjective. When a noun names a kind of thing rather than its owner, keep it singular with no apostrophe: “user guide,” “member portal,” “visitor parking.” A name the owner publishes with an apostrophe keeps it.
Marks together and next to formatting
One mark at a time
Never end a sentence with two marks. When a sentence ends with an abbreviation that has a period, such as “a.m.,” that period ends the sentence too. When it ends with a question mark or an exclamation mark that belongs to a quotation or a title, that mark ends it, with no period added, and the same mark stands in for a comma at the same point. Never stack marks for effect, as in “?!” or “!!”.
Punctuation next to links, bold, and code
Leave punctuation that follows a link, bold or italic text, or a code span outside it, in plain text, unless the mark belongs to what is formatted. A period inside a link becomes part of the link; a comma inside bold makes the label look as if it contains a comma; a period inside a code span becomes part of the value the reader copies. When a URL has to be printed, keep the sentence’s closing mark out of the address, or move the URL to where nothing follows it. The example pairs show the markup in code spans so you can see where each element ends.
See [the release notes.](https://example.com/notes)See [the release notes](https://example.com/notes).Select **Save,** then **Close.**Select **Save**, then **Close**.Latin abbreviations
Latin abbreviations
Write the English words instead of a Latin abbreviation. Write “for example” for “e.g.,” “that is” for “i.e.,” “and so on” for “etc.,” “versus” or “compared with” for “vs.,” and “through” or “by” for “via.” Readers disagree about what the abbreviations mean and where their periods go; nobody disagrees about the words. The one exception is “et al.” inside a citation or a reference entry, where cite-et-al sets it; it stays out of running text, and “ibid.” is never used.