Common questions
What is camelCase?
camelCase joins words without spaces, capitalizing the first letter of each word except the first. Example: 'hello world' → 'helloWorld'. Used in JavaScript, Java, and Swift for variable and function names. Named after the humps of a camel.
What is the difference between camelCase and PascalCase?
PascalCase (also called UpperCamelCase) capitalizes the first letter of every word including the first. Example: 'hello world' → 'HelloWorld'. PascalCase is used for class names in most OOP languages (Java, C#, TypeScript). camelCase is used for variables and functions.
What is snake_case?
snake_case replaces spaces with underscores and uses all lowercase. Example: 'hello world' → 'hello_world'. Common in Python (PEP 8 standard for functions and variables), Ruby, and database column names. CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) is the uppercase version used for constants.
What is kebab-case?
kebab-case replaces spaces with hyphens and uses all lowercase. Example: 'hello world' → 'hello-world'. Used in HTML attributes, CSS class names, URL slugs, and file names. Also called lisp-case, spine-case, or CSS case.
What is title case?
Title case capitalizes the first letter of most words. In standard title case, major words are capitalized while short prepositions, conjunctions, and articles (a, an, the, in, on, at, for, but, etc.) remain lowercase unless they start the title. Example: 'the quick brown fox' → 'The Quick Brown Fox'.
What is sentence case?
Sentence case capitalizes only the first letter of the first word and any proper nouns. Example: 'THE QUICK BROWN FOX' → 'The quick brown fox'. It matches standard English grammar and is used for body text, email subjects, and UI labels in many style guides (including Google's Material Design).