Quote:
Originally Posted by murg
While true in theory, not practiced this way.
Generally, you'd use a <h1> (or other heading level) tag to delineate the chapter heading. This is fine and wonderful, but rather then using the CSS to define what the <h1> tag looks like, they do this: <h1 class="c1">
What's worse is when this is defined as <div class="c1">, which removes all content from the equation.
By embedding CSS classes in all (or almost all) of the HTML tags, the designers are tying the book vary tightly to the formatting. Which is what CSS is supposed to prevent. If you used simple tags <p>, and move the formatting into the CSS (p {text-indent: 1em;}, then all you have to do to change the formatting is change the CSS file.
|
I'm afraid that I strongly disagree with you. <h1 class="chapter-heading"> in the HTML file, and a "chapter-heading" class in the CSS file results in far more maintainable code than your suggestion. Class names should tell you what the style is used for, because you may very well want to use the same tag for many different purposes in the book.
This is probably a more appropriate topic for discussion in the "ePub" forum, though.