30 seconds of CSS

  Back to Home

Disable selection  interactivity

Makes the content unselectable.

HTML
<p>You can select me.</p>
<p class="unselectable">You can't select me!</p>
CSS
.unselectable {
  user-select: none;
}
Demo

You can select me.

You can't select me!

Explanation
  • user-select: none specifies that the text cannot be selected.
Browser support

97.5%

⚠️ Requires prefixes for full support.
⚠️ This is not a secure method to prevent users from copying content.