ident
Quick Summary for <ident>
The <ident> CSS data type denotes an arbitrary string used as an identifier.
Code Usage for <ident>
nono79        A mix of alphanumeric characters and numbers ground-level  A mix of alphanumeric characters and a dash -test         A dash followed by alphanumeric characters --toto        A custom-property like identifier _internal     An underscore followed by alphanumeric characters \22 toto      A Unicode character followed by a sequence of alphanumeric characters bili\.bob     A correctly escaped period 
More Details for <ident>

ident

The <ident> CSS data type denotes an arbitrary string used as an identifier.

Syntax

The syntax of <custom-ident> is similar to CSS identifiers (such as property names), except that it is case-sensitive. It consists of one or more characters, where characters can be any of the following:

any alphabetical character (A to Z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a Unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its Unicode code point)

Note that id1, Id1, iD1 and ID1 are all different identifiers as they are case-sensitive. On the other hand, as there are several ways to escape a character, toto\? and toto\3F are the same identifiers.

Examples

Valid identifiers

nono79        A mix of alphanumeric characters and numbers ground-level  A mix of alphanumeric characters and a dash -test         A dash followed by alphanumeric characters --toto        A custom-property like identifier _internal     An underscore followed by alphanumeric characters \22 toto      A Unicode character followed by a sequence of alphanumeric characters bili\.bob     A correctly escaped period 

Invalid identifiers

34rem     It must not start with a decimal digit. -12rad    It must not start with a dash followed by a decimal digit. bili.bob  Only alphanumeric characters, _, and - needn't be escaped. 'bilibob' This would be a <string>. "bilibob" This would be a <string>. 

Specifications

Specification Status Comment
CSS Values and Units Module Level 4The definition of '<ident>' in that specification. Editor's Draft
CSS Values and Units Module Level 3The definition of '<ident>' in that specification. Candidate Recommendation

As this type is not a real type but a convenience type used to simplify the definition of other CSS syntax.

See also

<custom-ident> – A restricted subset of <ident> values excluding CSS-wide keywords, custom properties and other per-property values.

Last modified: Jan 25, 2022, by MDN contributors

Select your preferred language English (US)日本語 Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
The problem with hoarding is you end up living off your reserves. Eventually, you’ll become stale. If you give away everything you have, you are left with nothing. This forces you to look, to be aware, to replenish. . . . Somehow the more you give away, the more comes back to you.
Paul Arden
Random CSS Property

mask-image

The mask-image CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the mask-mode property.
mask-image css reference