I'm trying to make it so certain text and images on an HTML page cannot be highlighted with the cursor, so it appears as if they're a part of the background.
In our HTML file, we will assign some text to the “<p>” tag and mention it inside the <body> tag. In the CSS file, simply utilize the “user-select” property with the value “none”. This will make the text unselectable respectively.
Complete HTML/CSS Course 2022 On double click on a text or image, it is highlighted (selected). The user select property can be used to prevent this. By setting this property to none, we can prevent our image from being selected (highlighted).
Is there a way to make text unselectable on an HTML page?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With