-1

I am trying to format a Markdown blockquote in a Stack Overflow post where:

  • The first line is larger (like a header).
  • The following lines are normal size.
  • Each line is separated by single line breaks, not full paragraph spacing.

Desired appearance:

Desired result

Initially I tried using an <h1> header tag on the first line and two spaces for line breaks. This rendered the first line correctly, but the two-space line breaks on the following lines were ignored.

> <h1>BIG CHART TITLE</h1>  
> small-font metric 1  
> small-font metric 2  
> small-font metric 3

BIG CHART TITLE

small-font metric 1 small-font metric 2 small-font metric 3

I tried several other methods, such as using <br> tags,

> <h1>BIG CHART TITLE</h1>
> small-font metric 1<br>
> small-font metric 2<br>
> small-font metric 3

using # for the header instead of <h1>,

> # BIG CHART TITLE
> small-font metric 1  
> small-font metric 2  
> small-font metric 3

and adding a blockquote marker below the header,

> <h1>BIG CHART TITLE</h1>
> 
> small-font metric 1  
> small-font metric 2  
> small-font metric 3

but each of these added a larger paragraph-like gap after the header instead of a single line break.

BIG CHART TITLE

small-font metric 1
small-font metric 2
small-font metric 3

I've had so much trouble reproducing the desired effect, I resorted to abusing non-breaking spaces in order to make the example screenshot earlier in this post.

abusing non-breaking spaces for example image

How can I make a multi-line blockquote in Markdown where the first line is large, followed by normal sized lines, with small, single line-break spacing between each line? I am open to using in-line HTML tags mixed with markdown.

This question was inspired by a Super User question about mixing font sizes in Excel chart titles.

4
  • 2
    It feels like this should be asked on meta.stackoverflow.com instead. It's not about programming, but about how to format a post on Stack Overflow. If I had to guess, this is not a Markdown "problem", but it depends on the CSS used on the rendered HTML page. Commented Jul 15 at 17:49
  • I agree: this is not a software development question, and the topic belongs to meta discussion. I would also add: there are different flavors of Markdown, not only different styles. If your question is specific to Stackoverflow rendering, the answer is: you cannot change it, this is what it is. Don't you think it is natural style, to add some gap between a header and a next paragraph? Commented Jul 16 at 0:50
  • @knittl I would argue this question is as relevant to programming as any other markdown related question on the site. Commented Jul 16 at 12:44
  • When using a h1 in a blockquote you'll see the default h1-margins. SO (and other platforms like github) may add a CSS rule to remove this margins in blockquotes. But you can't override this style in markdown itself. Bear in mind markdown is not intended as a full-blown HTML abstraction. These style restrictions are intentional to prevent potentially distracting style changes across multiple posts. While I agree from a design prespective the defaults could sometimes be prettier (epecially tables) - I really doubt we'll ever see extensions allowing us more typographic options in markdown Commented Jul 20 at 18:27

1 Answer 1

0

You can't do both on stackoverflow

BIG CHART TITLE
metric 1
metric 2
metric 3

BIG CHART TITLE
metric1
metric2
metric3

BIG CHART TITLE

metric1
metric2
metric3

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.