Favorites

CSS <ident> Data Type

<ident>
CSS Data TypeThis data type is supported by all modern browsers.
Updated 21st November 2026

The <ident> data type is an unquoted identifier, read as a single word. It is the general form behind CSS keywords and author-chosen names.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The <ident> CSS data type represents an identifier: a sequence of characters that is not quoted and is read as a single word. It is the most general form of name in CSS, and the building block for keywords such as auto and block, property names, and author-defined names. The more specific types <custom-ident> (names you choose, such as animation names) and <dashed-ident> (names starting with two dashes) are both kinds of <ident>.

An identifier can contain the letters a to z and A to Z, the digits 0 to 9, hyphens (-), underscores (_) and any non-ASCII character. It must not start with a digit, or with a hyphen followed by a digit. Any other character, including spaces and punctuation, can be included by escaping it with a backslash, either directly (\.) or as a hexadecimal code point (\2E ).

Whether an identifier is case-sensitive depends on where it is used: CSS keywords are case-insensitive (AUTO and auto mean the same), while author-defined names such as animation and counter names are case-sensitive. Unlike a <string>, an identifier is never written in quotes.

Examples of valid and invalid identifiers:

/* Valid */
nono79
ground-level
-test
_internal
\31 23        /* escaped digit: "123" */
bili\.bob     /* escaped period */
日本          /* non-ASCII characters */

/* Invalid */
34rem         /* starts with a digit */
-12rad        /* hyphen followed by a digit */
bili.bob      /* unescaped period */
"name"        /* quoted: this is a string */

Syntax

<ident> = [ -- | - ]? <name-start-character> <name-character>*

Values

  • <ident>Letters (a-z, A-Z), digits (0-9), hyphens (-), underscores (_), non-ASCII characters and escaped characters. It must not begin with a digit, two hyphens followed by nothing, or a hyphen followed by a digit.

Example

<div class="wrap">
<h1>CSS &lt;ident&gt; examples</h1>
<ul class="list">
<li><code>counter-reset: step</code> (step is an identifier)</li>
<li><code>animation: pulse ...</code> (pulse is an identifier)</li>
<li><code>display: block</code> (block is a keyword identifier)</li>
</ul>
</div>
/* Base demo layout */
* { box-sizing: border-box; }

body {
  margin: 24px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: #f5f7fb;
  color: #102a43;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  font-size: 20px;
  margin: 0 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}

.label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  color: #486581;
  margin-top: 10px;
  word-break: break-word;
}

.note {
  font-size: 13px;
  color: #486581;
  margin-top: 14px;
}

/*  examples */
/* "pulse" and "step" are author-defined identifiers */
@keyframes pulse {
  50% { transform: scale(1.08); }
}

.list {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  counter-increment: step;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.list li::before {
  content: counter(step);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  animation: pulse 1.5s ease-in-out infinite;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  color: #486581;
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS ident data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.

This data type is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee