html tutorial - How to disable text selection highlighting in the browsers using CSS - html5 - html code - html form



Answer: Use the CSS ::selection Pseudo-element

This command used to disable the highlighted CSS ::selection pseudo-element because by default, when user select some text in the browsers it highlighted automatically in blue color.

    Example

      ::selection {
          color: none;
          background: none;
      }
      /* For Mozilla Firefox */
      ::-moz-selection {
          color: none;
          background: none;
      }

      Related Searches to How to disable text selection highlighting in the browsers using CSS