The Ribbon shows certain tabs like 'Edit', 'View', 'Items', 'List' etc., when we are on a list form page or when a List is added to any SharePoint page. In some cases we do not want to show these tabs to the users, which can be hidden by adding JSOM code to remove the unwanted tabs. Below is the code to get an instance of the Ribbon and remove the Edit tab from the Ribbon. This JavaScript can be added to a certain list form page through a Script Editor WebPart or can be included in a custom list definition.