Quote:
Originally Posted by Turtle91
Code:
<h3>Chapter 1 <span>This is the title of the chapter</span></h3>
The CSS would look something like this:
Code:
h3 {font-weight:bold; text-align:center; font-size:1.2em}
h3 span {display:block; font-weight:normal; font-size:.8em; font-style:italic; font-family:serif}
This very specifically defines which <span> is being styled (any <span> within an <h3>). It also minimizes code bloat (no need to say <span class="chaptertitle"> on every chapter).
It is certainly not required to do it this way...you can add extensively defined spans to every letter if you want...but having an empty naked <span> does not automatically mean it is wrong.
|
What I was seeing in the ebook where removing the naked spans caused very noticeable changes was the author/publisher using a span following a p to define the dropcap class, 3 flavours of h1, h2 and h3 with a span defined in the stylesheet, etc., all without using names.
My personal preference is to give these classes names just to make it easier for me to follow later. <p><span>A</span> is a bit harder to follow than <p><span class="dropcap1">A</span> when you come back to it a few months later.