Poems should be wrapped in <pre>
tags because they require that their precise formatting be kept and not removed by the browser. Remember, browsers reduce extra whitespace to a single space in <p>
tags. <pre>
tags don’t require a monospace font, which can be changed with css anyway if that is the case. Or give it a class ‘poem’ and change the font for all pre.poem
elements.
That is exactly what mikl meant: “it’s not very useful for poems or other things that require precise formatting.”
Github only does that for things like issues, comments and pull request descriptions. When displaying a README.md
file, github does change:
aaa
bbb
to:
aaa bbb
Github also always strongly suggest that every project has such a file.
The user obviously doesn’t see the characters <br>
, but the browser does display the <br>
tags in the form of line breaks. In other words, the browser forcefully wraps the text at the place of each <br>
tag which is not desired and ‘looks weird’. The reason this would look weird in the browser and not when viewing the plain text is because fixed width fonts are not used when viewing in the browser unlike when viewing plain text.
No, it means exactly to swallow them when producing html. The following is what many people write like, one such massive use case is email, but also just in general, meaning hardwrapping their text:
The overriding design goal for Markdown's formatting syntax is to make
it as readable as possible. The idea is that a Markdown-formatted
document should be publishable as-is, as plain text, without looking
like it's been marked up with tags or formatting instructions. While
Markdown's syntax has been influenced by several existing text-to-HTML
filters, the single biggest source of inspiration for Markdown's
syntax is the format of plain text email.
The intention here is that when viewed in plain text form, the text will always be wrapped after the words make
, formatted
, looking
and so on from the above example. However, the whole thing should be interpreted as a paragraph when converted to HTML. So it should only be wrapped in <p>
tags and no <br>
should be inputted after the words make
, formatted
, looking
etc. This is because they want the browser (through css or otherwise) to handle such wrapping for them, as it is much more flexible that way.
Any <br>
tags placed in those positions have no semantic meaning, and hence should not be there when the browser has more advanced methods to wrap text. The whole point of markdown is to be able to make text ‘look pretty’ or readable in plain text form. Inserting line breaks by hand usually at colum 72 or 80, hardwrapping, makes paragraphs look better when viewed in plain text.
With your proposal, those who hardwrap their text like that are forced to do:
The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email.
to get the same effect (i.e. not having any <br>
tags inserted inside the paragraph). Notice how it’s one very long line. (If you view the source, you’ll notice the hardwrapping example has \n
after the words make
, formatted
, looking
and so on, whereas the above example does not.) Every paragraph would have to be like that.