We can prevent elements to be selected using CSS

This article was published on Apr 22, 2022, and takes less than a minute to read.

Sometimes it might be handy when you have text that could be selected and copied by the user to prevent certain elements from being copied.

I've realized that we can simply do that by using the CSS property user-select: none:

span {
  user-select: none;
}

Reference