I follow the recommendations of the HTML spec’s editor to use paragraphs for stanzas and line breaks for lines. (They also suggest using the HTML preformatted text element pre for poems that use creative indentation or spacing; the default rendering for that uses a monospace font, which you may want to change.)
By default Obsidian treats a newline as a line break, but that’s not standard Markdown so may not be treated correctly by other Markdown apps. The official Markdown way to mark a line break, which should work in any Markdown app, is to put 2 or more spaces at the end (Obsidian’s optional “Strict line breaks” setting enforces this). I do this, but it’s obviously a bad syntax because it’s invisible. CommonMark, the standardized Markdown variant that Obsidian’s is ultimately based on, also allows line breaks to be marked with a backslash at the end of the line. That’s less widely compatible but I’d guess still pretty commonly supported.
It may be difficult or impossible to style lines separately (for example to apply a hanging indent when they wrap) when they are only marked by a line break. I think this at least used to be the case but not sure if it’s true now.
Other Obsidian poetry threads:
- Formatting poetry with a specific font, and preserving whitespace, with additional formatting (italics)
- Markdown formatting lyrical verses
Other discussion (much of it old):
- PoeticSemantics - HTML WG Wiki
- https://stackoverflow.com/questions/14734564/how-to-semantically-tag-poem-text
- Formatting Poetry Using CSS - Mikes Research and Development
- How to format poetry on the web: an incomplete guide – Via Negativa
- https://stackoverflow.com/questions/74439659/markup-a-poem-or-song-lyrics-to-be-accessible-to-the-visually-impaired
- https://uutpoetry.tumblr.com/post/85090187055/a-guide-to-formatting-poems-on-the-internet
- Passing a Hypertext Markup Language Poem - The Utopian Fool
- Marking up poetry in (x)html - gutvol-d - lists.pglaf.org
- Your HTML5 Questions 19 | HTML5 Doctor