Remove space between lines in HTML in WordPress

I’m trying to get rid of the pesky space that exists currently between my lines. I have them separated by different headings for editing reasons (bold, regular, color). How do I remove this space?

See below

<h3><span style="font-size: 14px;">XXXXXXXXX</span></h3>
<h4><span style="font-size: 14px;">XXXXXXXXXXXXXXX<a href="mailto:XXXXXXXXXXXXXX">XXXXXXXXXXXXX/a> </span></h4>

Related posts

Leave a Reply

2 comments

  1. Use CSS

    <h3 style="padding:0; margin:0"><span style="font-size: 14px;">XXXXXXXXX</span></h3>
    

    Ideally, you would define the CSS in a separate file

    h3, h4 {
       padding: 0;
       margin: 0;
    }
    

    For further control you can add class names (so it doesn’t apply to all h3s) and chose padding/margin sides

    <h3 class="news">...</h3>
    
    h3.news {
       padding-bottom: 2px;
       padding-top: 5px;
       margin-left: 3px;
    }