Home > front end >  How can I write a link with multiple lines in Markdown?
How can I write a link with multiple lines in Markdown?

Time:02-23

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)

CodePudding user response:

You just need a backslash before your newlines:

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

line1

line2

CodePudding user response:

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

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