02-24-2010, 10:22 PM | #1 |
Wizard
Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Italics html question
I'm curious to know if this has always been the case but in the past I remembered if you did not close an italics or bold tag the rest of the following paragraphs would remain bolded or italicized until it hit a closing tag.
I'm noticing in some recent conversions that the Paragraph tag < / P> works as a < / I> and as a < / B> Is there anyway to stop it from doing that? Some of the stories I'm converting have more than one paragraph of bolded or italicized text and the program I use adds the tag at the beginning and then at the end. But when Calibre converts nothing past the first < / P> remained italicized. I'd appreciate any advice or help. |
02-24-2010, 11:47 PM | #2 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
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. |
Advert | |
|
02-25-2010, 12:25 AM | #3 | |
Wizard
Posts: 1,163
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
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. |
|
02-25-2010, 01:57 AM | #4 |
Wizard
Posts: 1,763
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
try using tidy html cleaner that works quite well in cleaning up html tag errors
I personally use notepad++ that has built in Tidy and is great for fixing html files plus it can also auto generate css for you. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about using Sigil to convert HTML | ficbot | Sigil | 9 | 03-06-2011 08:12 AM |
New to Calibre - Recipe/HTML question | ClairePMR | Calibre | 3 | 07-23-2010 11:53 AM |
Format Question html to ePub | Fabe | Calibre | 3 | 04-21-2010 05:08 PM |
Book Covers and Borders, Plus Italics Question | KingOfMyWorld | Calibre | 1 | 02-18-2010 07:01 PM |
html formatting question | Nate the great | Workshop | 49 | 07-17-2009 10:33 AM |