Are you using a reset css…I’m guessing not. You should look into that.
Try setting the margins on your p.heading to 0.
Many elements come with built-in margins/padding and a reset css will remove those.
There are many freely available to copy and use and customise to your desires. Another option is normalize.css which does the same thing (basically) but with the intention of making browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.