The user-select property controls whether and how the user can select text within the element. Useful for buttons (none), atomic typography (all), or for keeping selection bounded (contain).button {
user-select: none;
}.copy-token {
user-select: all;
font-family: monospace;
}autoDefault. On ::before/::after acts as none; on editable elements as contain; otherwise inherits or text.textElement imposes no constraint on selection — normal text behavior.noneSelection cannot start within the element; any attempt ends at its boundary. Descendants may override locally.containSelections started here cannot extend outside; external selections cannot end inside.allContent is selected atomically — a partial selection expands to the whole element and descendants. Useful for share codes and addresses.CSS Basic User Interface Module Level 4Editor's DraftW3CMDNCSS css aBcDeF 123 CSS css aBcDeF 123Show all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationsourcesvisual demonstrationpreviousnext