View Single Post
Old 04-06-2015, 10:22 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,652
Karma: 205022288
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's not the p tag it's barking about, it's the 'align' attribute. In all the examples you listed (with exception of the last one), it's those attributes that are invalid for the xhtml requirements of the epub.

The align="xxxx" either needs to be moved to CSS (either inline or external) using the text-align property. Or if you insist on styling within the tag itself, you'll have to use something like:
Code:
<p style="text-align:center;">Text to be centered</p>
The u tag is not valid in xhtml. Though I know of no reading system that won't render the u tag, the "proper" way to underline text in xhtml is to apply the text-decoration style attribute to an element--commonly the span tag. As above, you can do so through CSS or inline styling.
In the css file:
Code:
span.underlined { text-decoration: underline; }
And in the xhtml:
Code:
<p>Some text needs to be <span class="underlined">underlined</span>.</p>
or

Code:
<p>Some text needs to be <span style="text-decoration:underline;">underlined</span>.</p>

Last edited by DiapDealer; 04-06-2015 at 10:24 AM.
DiapDealer is offline   Reply With Quote