126
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Organization

ケバブケース(kebab-case)について調べた

動機

キャメルケース(CamelCase)は知っていたが、HTMLやCSSなどで使われているハイフン(-)で単語を区切ることを何というのか気になったので、調べてみた。

調べた結果

ケバブケースkebab-case)というらしい。Lispでも使われるので lisp-case とも。

疑問

何故 ケバブ
理由を探したが見つからなかった…。

「串刺し」 だからだそうです(コメントより)。@riocampos @__hage さん、ありがとうございます! :smile:

まとめ

名称 用例 主な言語
キャメルケース camelCase Java, JavaScript
スネークケース snake_case PHP, Python, Ruby
ケバブケース kebab-case HTML, CSS, Lisp

参考にしたサイト

lodash.js にはケバブケースに変換する関数がある。

本文に関係ないけど、Web系の命名規則の推奨されるやり方が載っていたので、メモしておく。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
126
Help us understand the problem. What are the problem?