Insert <br> tag correctly

Hi,

I inserted this code:

echo '<h2 style="display: inline;">Payment Type:</h2><p style="display: inline;"> ' . $order->get_payment_method_title() . '</p>';

and I want to break a line at the end of the paragraph.

I tried to add <br> tag in several ways, but it doesn’t work!

Like this :

echo '<h2 style="display: inline;">Payment Type:</h2><p style="display: inline;"> ' . $order->get_payment_method_title() . '</p>' . '<br>';
  

Or:

echo '<h2 style="display: inline;">Payment Type:</h2><p style="display: inline;"> ' . $order->get_payment_method_title() . ',<br> ' . '</p>';
  

What is the correct way to insert the <br> tag in the first code?

Thank you,

Wrap both inline elements inside a block-level element, like a div. Then add however much space you need using a margin-bottom on the wrapping element. The br tag is meant for line breaks, don’t use it for spacing.