Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2011, 09:01 AM   #1
bfollowell
Fanatic
bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.
 
Posts: 519
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Amazon Kindle 3 Wi-Fi & Samsung Galaxy Tab S 10.5
Why define a paragraph as a span with no different or extra formatting?

I'm not sure if this is the best forum for this question or not. It applies to pretty much any ebook in any format but, since I happen to be using epub, I'll ask it here.

Maybe I'm missing something but I'm a little confused with as to something would be defined as a span with no different or extra formatting.
I mean, I've seen spans like:

<span class="italic">whatever</span>

or

<span class="bold">something else</span>

but what purpose would defining something as a span with nothing else serve? Something like:

<span>just regular old text</span>

The only thing I could see is that it just takes up space and makes the file a little larger.

Am I missing something?

I've seen similar occurrences of the <div> tag. If something isn't really different, I really don't understand the purpose of setting it apart from the rest of the text or chapter.

I have an epub that has almost every single paragraph defined as a span and I can't figure out why or if it would cause me any problems to remove a 4,000 of these occurrences.

Thanks for any advice.

Sincerely,
- Byron
bfollowell is offline   Reply With Quote
Advert
Old 03-16-2011, 09:04 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 80,510
Karma: 73099505
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
The most likely explanation is that it's been put there by a tool of some sort. There should certainly be no problem with removing surplus "span" tags, but note that a "div" is a little different - it causes a line break.
HarryT is offline   Reply With Quote
Old 03-16-2011, 09:16 AM   #3
bfollowell
Fanatic
bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.
 
Posts: 519
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Amazon Kindle 3 Wi-Fi & Samsung Galaxy Tab S 10.5
Quote:
Originally Posted by HarryT View Post
The most likely explanation is that it's been put there by a tool of some sort. There should certainly be no problem with removing surplus "span" tags, but note that a "div" is a little different - it causes a line break.
Good to know. I'll just start batch removing the vanilla <span> tags then and will consider the <div> tags on a case-by-case basis.

Thanks for the info. I really appreciate it.

- Byron
bfollowell is offline   Reply With Quote
Old 03-16-2011, 10:41 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,072
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I sometimes add class-less spans like this:

Code:
<h1><span>VIII</span> Chapter Title</h1>
But of course, it's not meaningless, because in CSS I style "h1 span" (span inside h1). And even if I don't, I (or someone else) could.
Jellby is offline   Reply With Quote
Old 03-16-2011, 01:26 PM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 80,510
Karma: 73099505
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
You're absolutely right. That is of course a valid use for it.
HarryT is offline   Reply With Quote
Advert
Old 03-16-2011, 02:13 PM   #6
bfollowell
Fanatic
bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.
 
Posts: 519
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Amazon Kindle 3 Wi-Fi & Samsung Galaxy Tab S 10.5
Quote:
Originally Posted by Jellby View Post
I sometimes add class-less spans like this:

Code:
<h1><span>VIII</span> Chapter Title</h1>
But of course, it's not meaningless, because in CSS I style "h1 span" (span inside h1). And even if I don't, I (or someone else) could.
I made sure it wasn't used this way before I deleted them. There were no span references anywhere in the css. Thanks.

- Byron
bfollowell is offline   Reply With Quote
Old 03-16-2011, 05:25 PM   #7
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
I did note a bug in an older version of iBooks once that would cause it to ignore centering text unless you placed a span or div like that around the text. For a while I put classless span elements in to force it to work properly.
adv_dp_fan is offline   Reply With Quote
Old 03-16-2011, 10:30 PM   #8
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Indesign conversion put the <span class=""> in the code
Adjust is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra paragraph line when converting from LRF jhempel24 Calibre 3 08-18-2010 07:00 AM
Should ebooks specify exact paragraph and page formatting? sourcejedi General Discussions 27 07-01-2010 06:08 PM
Remove Paragraph Formatting ghostyjack Sigil 33 06-16-2010 06:17 AM
I'm having a problem with extra paragraph spaces akosimike Calibre 10 05-27-2010 06:53 PM
TXT conversion to ePub or LRF - paragraph formatting Zapped Calibre 6 10-23-2009 05:06 PM


All times are GMT -4. The time now is 08:17 AM.


MobileRead.com is a privately owned, operated and funded community.