Owen Young
Owen Young

Reputation: 322

How can I write a link with multiple lines in Markdown?

Expect HTML:

<a href="https://example.com"><p>line1</p><p>line2</p></a>

How can I write this in Markdown?

The following doesn't work.

[line1

line2
](https://example.com)

Upvotes: 2

Views: 1814

Answers (2)

unrealapex
unrealapex

Reputation: 630

Try inserting line breaks(br tags) where you want multiple lines:

[line1<br><br>line2](https://google.com)

Upvotes: 0

You Old Fool
You Old Fool

Reputation: 22941

You just need a backslash before your newlines:

[line1\
\
line2](https://example.com)

line1

line2

Upvotes: 4

Related Questions