.

Friday, April 2, 2010

Manual line breaks

Occasionally, you will want to manually break a line without ending the paragraph.
For example, consider the example

Fran.
You come most carefully upon your hour.
Ber.
‘Tis now struck twelve. Get thee to bed, Francisco.
Fran.
For this relief much thanks: ‘tis bitter cold,
And I am sick at heart.

Since the text is from a play, it follows a particular style:
Actor-name
Dialogue

If you use a paragraph tag to cause each line break, you’ll end up with output similar
to the following:

Fran.
You come most carefully upon your hour.
Ber.
‘Tis now struck twelve. Get thee to bed, Francisco.
Fran.
For this relief much thanks: ‘tis bitter cold,
And I am sick at heart.

Instead, you should use a line break tag (<br>) where you need a line break in a
paragraph.
 The preceding text would be coded as follows:

<p>Fran.<br />
You come most carefully upon your hour.</p>
<p>Ber.<br />
'Tis now struck twelve. Get thee to bed, Francisco.</p>
<p>Fran.<br />
For this relief much thanks: 'tis bitter cold,
And I am sick at heart.</p>

 NOTE:Typically, you would use several different styles of paragraph tags to delimit the
different elements.
For example, when formatting a script for a play, you would
have a class for the actor and another for the dialogue.
An example follow:

<p class-"actor">Fran.</p>
<p class-"dialogue">For this relief much thanks:
'tis bitter cold,<br />
And I am sick at heart.</p>

That way, you could easily control (and change) the format of each element
separately.

Currently have 0 comments:


Leave a Reply