Home

dashcase

Dashcase, also known as dash-case or hyphen-case, is a naming convention in which a phrase is written in lowercase and words are separated by hyphens. This style is commonly used for web addresses, slugs, and identifiers in contexts that permit hyphens.

Common uses include URLs and slugs, file names, and CSS class names. In most programming languages, hyphens

Notation and conversion: break the phrase into words, convert to lowercase, and join with hyphens. Examples:

Relation to other conventions: dashcase is closely related to kebab-case; many communities treat dash-case and kebab-case

Advantages and limitations: hyphens enhance readability and are preferred in URLs for search engine optimization. They

are
not
allowed
in
identifiers,
so
dashcase
is
typically
not
used
for
variables
or
functions;
instead
it
appears
in
data
attributes,
configuration
keys,
resource
names,
and
in
content
management
workflows.
Dash
Case
becomes
dash-case;
user
profile
becomes
user-profile.
Depending
on
context,
numbers
may
be
preserved
(version-2-1)
and
punctuation
typically
removed
or
transliterated.
as
interchangeable.
It
differs
from
snake_case
(underscores)
and
from
CamelCase/PascalCase
(no
separators).
are
widely
supported
in
file
naming,
URLs,
and
HTML
identifiers.
Limitations
include
limited
applicability
in
programming
languages
for
identifiers
and
potential
ambiguity
with
the
minus
operator
in
code;
tooling
may
require
escaping
or
alternative
naming.