Quote:
Originally Posted by Tex2002ans
We agree on 99%, and only disagree on some minor differences (he says <div>, because "poetry isn't paragraphs"... and I still insist on <p>).
|
Lolz. Yup, div is more semantically correct, but I use <p> as well… it saves a micro-bit or two on file size, and it’s a little cleaner IMO.
I also tend to define a default style rather than putting a class on every line:
Code:
div.poetry {
margin: 1em 0 1em 2em;
}
div.poetry p {
margin: 0;
padding-left: 3em;
text-indent: -3em;
text-align: left;
}
div.poetry p.indent {
margin: 0;
padding-left: 5em;
text-indent: -3em;
text-align: left;
}
div.poetry p.space {
margin-top: 1em;
}
Code:
<div class="poetry">
<p>line of poetry</p>
<p class="indent">indented line of poetry</p>
<p>line of poetry</p>
<p class="space">line of poetry in new stanza</p>
<p>line of poetry</p>
<p>line of poetry</p>
<p class="space">line of poetry in new stanza</p>
<p>line of poetry</p>
<p>line of poetry</p>
</div>
Obviously there are many ways to skin that cat!