View Single Post
Old 10-15-2010, 05:41 AM   #7
Connochaetes
Junior Member
Connochaetes began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: PRS-300
Quote:
Originally Posted by twobits View Post
In html you are supposed to use the code tag instead of the pre tag, though the effect in browsers is usually the same. Does the epub xhtml not support that tag?
They don't do the same thing. <pre> preserves the layout (line breaks, whitespace) from the source file. <code> designates a phrase as code. An easy way to display indented code is to nest <code> within <pre>.

It is problematic at times on an eReader. I'll probably go with Falcao's solution - offer longer code snippets as a separate download. If I decide to take the plunge, that is.
Connochaetes is offline   Reply With Quote