
: Should every paragraph tag have a CSS style (InDesign)? I'm working on my first epub, and I would like to use the following CSS scheme: Most paragraph tags would have no class assigned and
I'm working on my first epub, and I would like to use the following CSS scheme:
Most paragraph tags would have no class assigned and would be styled by a simple rule in the style sheet...
p {}
A special series of paragraph tags would have a different style. However, I would put these paragraphs inside div's, so the style would just look something like this:
div.footnote p { margin: 2px 15px; indent: 0; }
Any remaining paragraphs that require special styling would be assigned classes. They would be the only paragraph tags with classes.
Is this scheme OK, or is there a special reason I should give every paragraph tag a class? I'm asking because I think I remember a comment about this on some tutorial that I can't locate right now. I just want to make sure I'm not making a major gaffe by creating an epub with empty tags.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @BetL

: How to search for audiobooks narrated by the author? How should I search for audiobooks narrated by their author? Are they ‘auto-narrated’, ‘self-narrated’, ‘author-narrated’, or something

: Which size is taken into account by Amazon when calculating the download fees I get two very different sizes for my ebook in mobi format and, before publishing it, would like to know which
2 Comments
Sorted by latest first Latest Oldest Best
As Anthon says, there is no need to apply a class to every paragraph, if that paragraph don't need to be styled in a particular way, different from the others.
It is perfectly acceptable to have, in example, <p>This is a simple paragraph without an associated style</p>.
This is a bit beyond the scope of your question, but it is related to "default" text and could be handy to know: if you need to define a default style for all your text (<p>, <div>, <h1>... you got the point), you can define the custom styling to apply to the html <body> tag, in example
body {
font-family: arial, helvetica, sans-serif;
text-align: justify;
font-size: 1.2em;
}
it will set the base style of the text, when not given a different one with more specific tags.
Again, this is not required, most of the times you won't need to set this at all. You should only define it if you don't want your text to use the default settings of the e-reader.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
There is no need to give every paragraph a class, the definition at 1. will apply to every paragraph, with or without a tag, and only on paragraphs that are directly below a footnote the settings will be overruled by those of the CSS of 2.
You might not even need to have the CSS at 1., but for the defaults of the ePub reader.
Free books android app tbrJar TBR JAR Read Free books online gutenberg