Is the <blockquote> tag working correctly in ths forum? [migrated]

Solution 1:

You don't need HTML. Instead, to make a blockquote, use the > character. Remember to have a blank line after the end of the blockquote. Here's an example:

> Ask Ubuntu is amazing!

Here's how that will render

Ask Ubuntu is amazing!

And using multiple lines:

> Ask Ubuntu is amazing!
>
> Unix SE is very good, too!

And here is how that will render

Ask Ubuntu is amazing!

Unix SE is very good, too!

If you really want to use HTML instead of Markdown, you can. Here's how:

<blockquote>
Ask Ubuntu is amazing!
Unix SE is great, too!
</blockquote>

Remember to have a blank line after </blockquote> or strange things can happen.

And that will render as this:

Ask Ubuntu is amazing! Unix SE is great, too!

You mentioned it isn't making a newline. You have to have an entire blank line if you want a linebreak, like this:

<blockquote>
Ask Ubuntu is amazing!

Unix SE is great, too!
</blockquote>

And that will render as this (with the newline as desired). For the Markdown version, just include a > on a line by itself to indicate a line break.

Ask Ubuntu is amazing!

Unix SE is great, too!

For the rest of the valid HTML tags on SE, see this Meta SE post


However, for command output (or code), don't use blockquotes. Instead, use a codeblock, and you start end end those with three backticks (```). Here's an example (you can optionally include a language, like C or Python, after the three backticks if you want, for syntax highlighting)

```c
int main()
{
    printf("Hello World");
    return 0;
}
```

That will render like this:

int main()
{
    printf("Hello World");
    return 0;
}

If you're wondering why you have to include an entire blank line (or, in the Markdown version, add a > on a line by itself), check out this Stack Overflow question that includes the reasons.

Solution 2:

Blockquote formatting does not preserve line breaks, which is why it should not be used to format output from a command - long output becomes horribly unreadable, and since blockquoted text, unlike unformatted text, also loses the original line breaks from the markdown text, it is impossible to fix the problem by editing!

Use code formatting to preserve line breaks in output from a terminal or code, or if the text is actually a quote rather than code(like text) and for some reason you really need to preserve the line breaks, you can insert line breaks as needed by putting two spaces and then a newline, though I rarely find any need to do so.