how to remove side scroll in html code example

Example 1: hide scrollbar css

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge add Firefox */
.scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none; /* Firefox */
}

Example 2: how to remove side scroll bar

body {
  overflow-x: hidden;
}

  /* MORE OPTIONS : - 
    overflow-x: auto;
    overflow-x: scroll;
    overflow-x: visible;
  */

Example 3: javascript hide scrollbar

function HideScrollbar() {
  var style = document.createElement("style");
  style.innerHTML = `body::-webkit-scrollbar {display: none;}`;
  document.head.appendChild(style);
}