Capitalization

When to capitalize, and when to leave a word lowercase.

Capitalize a name. Leave everything else alone. Most disagreements about capitalization are really disagreements about whether a thing is a name, and answering that question settles the spelling.

A capital letter is a claim that a word is the name of one particular thing. Applying it to an ordinary noun — a feature, a format, a role — asks the reader to look for a proper noun that is not there.

Capitalization in headings

A page title is set in title case, capitalizing the first word, the last word, and everything between them except articles, coordinating conjunctions, and prepositions.

Recommended: Documenting Command-Line Syntax

Not recommended: Documenting Command Line Syntax

A heading inside a page is set in sentence case: the first word capitalized, and after that only what would be capitalized in running text.

Recommended: Explaining placeholders

Not recommended: Explaining Placeholders

A page adapted from someone else's writing keeps the capitalization it arrived with. Rewriting the headings of a page that carries an attribution line makes it harder to check the adaptation against its source.

The name of the project

The project is OpenINF. One capital at the front for Open, three at the back for INF, and nothing else.

Recommended: OpenINF

Not recommended: OPENINF, Openinf, openINF

Setting the name in full capitals is shouting it, and a name that shouts in running text is a name the reader learns to skip. This holds in headings, in navigation, and in the small print at the foot of a page — nowhere is it OPENINF.

The scope on npm is lowercase, because npm scopes are lowercase: @openinf. Write a package name exactly as it is published, in code font, and never capitalize it to start a sentence. Rewrite the sentence instead.

Recommended: The @openinf/util-types package has no dependencies.

Not recommended: @openinf/util-types has no dependencies.

Words that only look like names

Technologies, formats, and general concepts are ordinary nouns. They take a capital only where a name is embedded in them.

WriteNot
open sourceOpen Source
the webthe Web
the internetthe Internet
a pull requesta Pull Request
the command linethe Command Line
JavaScript, npm, GitJavascript, NPM, git

The last row is the exception that proves the rule: those three are names, and each has one correct spelling that is neither all lowercase nor all capitals.

After a colon

A colon does not start a new sentence, so what follows it is capitalized only if it would be capitalized anywhere else. See Colons for when the colon is the right mark at all.