How to completely get rid of page titles with no use of plugins?


Hello StackExchange community, I desperately need your help.

I am trying to completely get rid of the page title and the space that occupies right before the beginning of the content. Here is what I have done:

  1. Leaving the space blanked

    Having pages without a name is not recommended. It will be hard to browse them via your dashboard. With that being said, if you leave the title field empty there is still a margin before the content.

  2. Hiding the title with CSS

    I have used the following CSS .page .entry-title{ display: none; } to globally hide page titles from pages. Even so, there is still a margin before the content. I then tried .entry-header instead of .entry-title but did not work anyway.

Inspecting the elements from my browser, I spot a style added the element <main id="main" class="site-main" role="main"> which is surprisingly different in every browser. On Safari, for example, would be style="margin-top: 40px;" and on Chrome style="margin-top: 75px;".

When I go to the page.php and index.php files of my theme, all I find is a simple, clean <main id="main" class="site-main" role="main"> and I wonder where is this style being generated. Is it WordPress through its functions? I also tried to override this style with adding my own style="margin-top: 0px !important;" but it didn’t work.

I currently building on Blask Theme. Does this even matter?