CSS: Prevent Right Click
Prevent Right Click
to prevent right click, use this JavaScript
document.addEventListener ('contextmenu', (x => x.preventDefault ()) , false);
user-select Property
Prevent text selection.
Note, this does not work for right-click menu.
body {user-select: none;}
Note: does not work in Safari nor Firefox as of 2019-02-26
Possible values:
user-select:auto- inital value.
user-select:none- not selectable.
user-select:text- selectable.
user-select:contain- (not much used)
user-select:all- (not much used)
CSS, misc, advanced
- CSS: Case Sensitivity
- CSS: Declare Charset
- CSS: Comment Syntax
- CSS: Default Unit
- CSS: Computed Style
- CSS: Pseudo Element
- CSS: Pseudo Class
- CSS: Specificity
- CSS: Data URI Scheme
- HTML: Protocol-Relative URL
- CSS: Browser Default Style Sheet (2025-12)