Interaction

user-select

Learn how to use the CSS user-select property.

CSS user-select

The user-select property sets the user select for an HTML element.

Syntax

.element {
  user-select: none;
}

HTML Context Example

<div class="card">
  This is a styled element.
</div>

<style>
.card {
  user-select: none;
}
</style>

Notes

Experiment in the CSS playground to see how this affects layout and styling.