Here is part of a long article that should be of interest to anyone setting up books in XHTML. It’s from the ePub Books Blog:
What we are going to discuss here is how to format poetry in XHTML format (which underlies EPUB) so that it looks nice on smartphone screens – that is, when many or even all of the lines do not fit the screen width. In other words, our concern is how to break poetry lines nicely.
We do not discuss the poems which use non-standard formatting (Lewis Carrol’s Fury said to a mouse, shaped like a twisting tail, is a good example of what we are not talking about here); each poem of this sort is a separate formatting problem of artistic rather then technical nature. What we are going to consider are poetry pieces which use some sort of conventional formatting. The examples used further in this tutorial are from Shakespeare, from Horace, and, for a more specific formatting convention, from Beowulf.
It is clearly unacceptable to use plain left-align text with no style modification: the result of line breaking will be rather ugly, as shown below (a few lines from Shakespeare’s Henry V are used):
Centering everything (a solution frequently met in actual e-books) is better, but still far enough from perfection:
Let us now proceed to another variant, which is also used widely enough and which I think to be a reasonable basic approach to the problem, and then see what we can add to it.