Writers of content for WordPress and Blogger websites create their own content in order to monetize it.
Scammers visit your website, pick out all the text content, and then copy it to their own website.
There may be instances when your designs dictate that a portion of your website be inaccessible unless specific requirements are fulfilled. You may want to disable text selection because you're furious that your contents are being stolen by someone using a simple copy and paste.
In any case, it shouldn't be difficult to disable text selection. Javascript and JQuery can be used in conjunction with basic CSS for the approach. This tutorial will cover how to use JavaScript, CSS, and HTML to disable text selection using the user-select property and other pertinent options.
How to Disable Text Selection in Website?
- Copy below the code.
- Go your website Dashboard.
- Paste the CSS code your main css file section.
* {
-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none; /* Standard syntax */
}
Warning!
Before we start adding codes in XML, I will recommend you to take a Backup of your current theme. By chance if any problem occurs, you can restore it later
Conclusion
This post describes How To Disable Text Selection On Websites. Hope it was enjoyable for you. In order to learn more, kindly follow our blog and share it with your friends.
