Is there any way to stop a heading tag from going onto a new line?

ie when i type:

This <H1>is</H1> a sentence

I want it to come out as:

This is a sentence

rather than:

This
is
a sentence