Programming - kebab-case definition with example

7 points
Created by:

In this article, we would like to explain the concept of the kebab-case naming style.

Kebab case example:



The main idea is to:

  1. combine words with dashes (-),
  2. write all letters in lowercase or uppercase.


Hint: kebab case with all uppercase letters is called as a scream kebab case.


Practical examples:

Input (regular text)     Output (in kebab-case)
--------------------     --------------------

E-book                   e-book
This is example text     this-is-example-text
HTML content             html-content
main HTML content        main-html-content
new HTTP APR library     new-http-apr-library

Scream kebab             SCREAM-KEBAB


Used in:

  • segments in URLs,
  • names and values in URL parameters,
  • CSS class names,
    e.g. site-header,
  • HTML id attribute names and values,
    e.g. data-user-id="some value here ...", id="site-header",
  • HTTP headers,
    e.g. content-type (in HTTP 1.1 and older: Content-Type),
  • package names,
    e.g. in npm react-router, etc.


See also

  1. Programming - Case Styles


  1. Naming convention (programming) - Delimiter-separated words - Wikipedia
  2. PascalCase - Wikipedia

Alternative titles

  1. Programming - kebab case definition with example
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Programming - Case Styles

Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

â€ïžđŸ’» 🙂