WordPress sometimes inserts extra line spaces (empty <p> tags). To remove the extra line space, try wrapping the content in <div> tags.
Using the <Enter> or <Return> key to add extra line spaces may not always work. The <br> tag also may not work because it only breaks up content that’s on the same line.
To add extra line spaces we need to use
which stands for “non-breaking space.”
For example, to add a line space at the top of the [dropdown] content, use
These are some of the quirks in WordPress that users need to work around.