8

When I want to start a new line, I've always used <br>. I'm wondering if there's a better way, however, that only uses Markdown. I'm aware that if you insert two line breaks, leaving a blank line, it works, like this:

But what if I don't want a blank line like you see above this line? I don't have a problem with using <br>, but it just seems like such a common task shouldn't require four extra characters when Markdown is supported.

12
  • 2
    Double space is for you. And you probably need to look at Markdown help
    – Himanshu
    Commented Feb 27, 2013 at 6:55
  • 5
    You shouldn't ever need to start a new line, really. Splitting paragraphs with line breaks makes sense for prose, IMO, but on Stack Exchange? I don't know.
    – slhck
    Commented Feb 27, 2013 at 7:22
  • 4
    You shouldn't force newlines, except possibly when you're writing a poem. In all other cases, you should force a new paragraph.
    – balpha StaffMod
    Commented Feb 27, 2013 at 8:07
  • I agree with balpha and slhck why force a line break. Commented Apr 15, 2013 at 15:31
  • Yes. It's called <br/>.
    – Cole Tobin
    Commented Aug 13, 2013 at 6:41
  • 1
    In case you think you need line breaks, then please read about the difference between a line break and a paragraph.
    – Arjan
    Commented Aug 13, 2013 at 6:48
  • @slhck I use new lines in a good 50% of my answers in the form bold paragraph title [new line] paragraph. For example here:stackoverflow.com/questions/17907255/… Commented Aug 13, 2013 at 10:29
  • 1
    @RichardTingle That is very unusual formatting and not according to any style guide, or proper HTML semantics either. What you're doing is putting a pseudo-heading into a paragraph, while instead you should use an HTML heading element like <h1> through <h3>.
    – slhck
    Commented Aug 13, 2013 at 10:34
  • @slhck aren't html elements workarounds, for use only where markdown is unavailable (eg ** are preferable to <b></b> except as a workaround for intraword emphasis). Commented Aug 13, 2013 at 10:37
  • @RichardTingle You can use # through ### to create the headings. I edited your post to give you an example.
    – slhck
    Commented Aug 13, 2013 at 10:39
  • @slhck thats actually very nice. I'll look into using that Commented Aug 13, 2013 at 10:48
  • Also, @Richard, using headings (or at least paragraphs) is so much nicer for people using screen readers. Now the screen reader understands it's a heading, not just some random bold text in a sentence. (Lacking the dot, "Conceptual implementation So you create a branching structure" was really just one sentence, regardless of the explicit line break.)
    – Arjan
    Commented Aug 17, 2013 at 8:19

2 Answers 2

13

You can add two trailing spaces to the end of the line:

This is a sentence
followed by a newline

Where:

This is a sentence    
------------------^^
2
1

Yes, you can, end your line with two spaces:

This is my line
broken without <br>

This is my line
Broken without <br>

2
  • Thank you too. I would accept this, but I wasn't sure which one was posted first (they both said 18 minutes ago) and (no offense) Jon Clements' post was more clear.
    – Sparkette
    Commented Feb 27, 2013 at 7:16
  • @flarn2006 if you mouse over the timestamp text, you get more detailed time information. Also if you mouse over the share links, you can see the post id (the first number) - these are issued in strict chronological order. So you can see that this post was made ten seconds before the other. But I wouldn't worry about it :)
    – AakashM
    Commented Feb 27, 2013 at 8:54

Not the answer you're looking for? Browse other questions tagged .