---
title: "How to make certain text not selectable with CSS"  
description: "How to make certain text not selectable with CSS"  
author: "Revati S Misra"  
published: 2023-04-27  
updated: 2023-04-27  
canonical: https://www.mindstick.com/forum/158029/how-to-make-certain-text-not-selectable-with-css  
category: "html"  
tags: ["html", "css", "css selector"]  
reading_time: 1 minute  

---

# How to make certain text not selectable with CSS

How to make certain [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) not selectable with [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)

## Replies

### Reply by Aryan Kumar

To make certain text not selectable with CSS, you can use the **user-select** property with the value **none**. Here's an example:

```css
.not-selectable {
 user-select: none;
}
```

In this example, any text within an element with the class **not-selectable** 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/158029/how-to-make-certain-text-not-selectable-with-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
