View Single Post
Old 02-25-2010, 12:25 AM   #3
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by frabjous View Post
It's considered very bad form in HTML to have the scope of tags overlap at all. Something of the form <p><i>...</p>...</i> should never exist. Probably it would mean that the HTML in question wouldn't pass validation tests.

So if you have multiple italicized paragraphs, you should have something like:

<p><i>Paragraph one ..</i></p>
<p><i>Paragraph two ..</i></p>

or better:

<p style="font-style: italic;">Paragraph one</p>
<p style="font-style: italic;>Paragraph two</p>

(Or the same by means of a CSS class and an appropriate stylesheet.)

Something like:

<div style="font-style: italic;">
<p>Paragraph one</p>
<p>Paragraph two</p>
</div>

might be OK, but it might have other issues, so I'd steer clear of it.
I think for a long time I just got used to huge blocks of text being converted to italics if you forgot to close them off so I had thought that's how they were supposed to work. (and it still works like that in web browsers)

Thanks for the clarification. It looks like I'll have to watch out for multiple paragraphs with italics and make sure I check the italics after converting to HTML.
Amalthia is offline   Reply With Quote