Question Details

No question body available.

Tags

html css

Answers (1)

February 11, 2026 Score: 2 Rep: 27,983 Quality: Low Completeness: 70%

Building on DBS's comment, a hyphen-delimited match can be done with 3 selectors for the start, middle, and end of the attribute value.

[data-tags|="15"], [data-tags*="-15-"], [data-tags$="-15"]

The |= selector handles both tag lists starting with 15 and those with 15 as the first element.

Represents elements with an attribute name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (U+002D).