Search code examples
htmltext-indent

Indent line after each <br /> in HTML


I try to turn a PDF book into a mobi book (html), and I also want to recreate the layout. There, after every break the text is intended one line. This should be doable with

<body style="text-indent:20px each-line;">

but I'm doing something wrong, as it doesn't work.

I don't want to do this with paragraphs as that also includes a blank line by default, but those breaks don't always mean a entire new paragraph...


Solution

  • each-line is not yet supported in browsers (see text-indent on MDN). However, this is what you will want to use when it becomes available.