---
title: "Making text unselectable"  
description: "Making text unselectable"  
author: "Revati S Misra"  
published: 2023-04-27  
updated: 2023-04-27  
canonical: https://www.mindstick.com/forum/158026/making-text-unselectable  
category: "html"  
tags: ["javascript", "html", "html validation"]  
reading_time: 1 minute  

---

# Making text unselectable

Making [text unselectable](https://www.mindstick.com/forum/158027/is-there-a-way-to-make-text-unselectable-on-an-html-page)

## Replies

### Reply by Aryan Kumar

To make [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) unselectable on an HTML page, you can use the **user-select** CSS property. Here's an example:

```css
.unselectable {
 user-select: none;
}
```

In this example, any element with the class **unselectable** will not be selectable by the user. This is particularly useful when you want to prevent users from copying or highlighting certain parts of the text, such as copyright notices or disclaimers.

Note that the **user-select** property is not supported in all browsers, particularly older versions of Internet Explorer. If you need to ensure cross-browser compatibility, you may want to use JavaScript instead to prevent text selection.


---

Original Source: https://www.mindstick.com/forum/158026/making-text-unselectable

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
