How to hide the page tab using Javascript in SharePoint

In this blog you will see how to hide the page tab using Javascript in SharePoint. Navigate to the SharePoint page. Click on Site Actions => Edit Page.
 
Add the content editor webpart to the page and add the following script.
 
<script type="text/javascript">
document.getElementById('Ribbon.WebPartPage-title').style.display = "none";
</script>
 
Page tab will be hidden successfully from the ribbon interface.