.

Friday, April 2, 2010

Soft Hyphens

Occasionally, you will want to allow a browser to hyphenate long words to better
justify a paragraph.
For example, consider the following code and its resulting
output in Shown In Figure :

<p style-"text-align: justify;">The morbid fear of the number 13, or
triskaidekaphobia, has plagued some important historic figures like Mark Twain
and Napoleon.</p>

In cases where you want a client browser to be able to hyphenate a word if
necessary, use the soft hyphen entity (&shy;) to specify where a word should be
hyphenated. Using the preceding example, you can hyphenate the word
"triskaidekaphobia" with soft hyphens:

<p style-"text-align: justify;">The morbid fear of the number 13, or
tris&shy;kai&shy;deka&shy;pho&shy;bia, has plagued some important historic
figures like Mark Twain and Napoleon.</p>




The resulting output, shown in Figure , shows how the option hyphens are used to
break the word and achieve better justification results.

Currently have 0 comments:


Leave a Reply