54

I'm trying to create a two-line <h1> in Markdown, something along the lines of:

<h1>Title<br/>byline</h1>

The Markdown docs say:

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

Unfortunately, this only seems to work for paragraphs -- if I try it with an <h1> (dots · indicate spaces):

#·Title··
byline

the trailing spaces are ignored and I just get:

<h1>Title</h1>

<p>byline</p>

Can anyone tell me a workaround for this?

P.S. I'm using vanilla Markdown 1.0.1 from the command line.

shgnInc
  • 2,054
  • 1
  • 23
  • 34
David Moles
  • 48,006
  • 27
  • 136
  • 235

3 Answers3

102

Turns out the answer is just "use <br/>."

# Title <br/> byline

produces

<h1>Title <br/> byline</h1>

** facepalm **

David Moles
  • 48,006
  • 27
  • 136
  • 235
3

Just use the alternative syntax for <h1>:

Title··
byline
========
SergeyR
  • 468
  • 5
  • 10
-2

You can also do double space at the end of the line. For example, this text appears in the same line even though I've written it on the next line.
This appears on a new line.

The thing is there are 2 blank spaces after next line... (Consider those two dots as spaces)

Hope this helps. This also seems better than </BR>.

Reference: http://markdown-guide.readthedocs.io/en/latest/basics.html

Raj Kumar
  • 1,547
  • 14
  • 19