Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2020, 04:14 AM   #1
coneheadZombie
Member
coneheadZombie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2019
Device: Moon+Reader (Android)
<i>, <em> or <span> for italics ?

I often see ebooks with all three of the mentioned mode to italicize text in ebooks.

Is there no standard way to do this or can we use any of these modes ?
coneheadZombie is offline   Reply With Quote
Old 06-07-2020, 05:10 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Have a look at the different replies to this StackOverflow post.
Doitsu is offline   Reply With Quote
Advert
Old 06-07-2020, 10:06 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Doitsu View Post
Have a look at the different replies to this StackOverflow post.
Rubbish. I have never seen a single case where <strong> was not bold and <em> was not italic.
JSWolf is offline   Reply With Quote
Old 06-07-2020, 11:48 AM   #4
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,285
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by JSWolf View Post
Rubbish. I have never seen a single case where <strong> was not bold and <em> was not italic.
You are not omniscient regarding HTML rendering.

Your dismissal as rubbish is rubbish.
j.p.s is offline   Reply With Quote
Old 06-07-2020, 01:20 PM   #5
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I dare say there are more things in heaven and Earth, Jon, than are dreamt of in your philosophy...

...or, in other words.... You don't know what you don't know....

...or, in even more other words... nvm....I think it's been said...


I, personally use <strong>/<em>, with a defining css, to be more semantically correct.
Turtle91 is online now   Reply With Quote
Advert
Old 06-07-2020, 01:57 PM   #6
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
IMHO, if you are designer don't bother. If you are editor, know your craft.
najgori is offline   Reply With Quote
Old 06-07-2020, 03:12 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Rubbish. I have never seen a single case where <strong> was not bold and <em> was not italic.
As I mentioned in an earlier post, I ran into one instance where underline was used for <em>. Emphasized is not italic.
DNSB is offline   Reply With Quote
Old 06-07-2020, 04:16 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
delete post
JSWolf is offline   Reply With Quote
Old 06-07-2020, 04:26 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
But you can change the definition of <i> and <b>.

Code:
i {
  font-weight: bold;
  font-style: normal;
  text-decoration: underline;
}
b {
  font-weight: normal;
  font-style: italic;
}
JSWolf is offline   Reply With Quote
Old 06-07-2020, 05:49 PM   #10
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Can we broaden the question and ask, what about p instead of h?, or my favorite, div instead of p? And I've seen these in recently released books. For too many people who are formatting books the only thing that matters is if it looks good in an ereader.
hobnail is offline   Reply With Quote
Old 06-07-2020, 06:50 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by hobnail View Post
Can we broaden the question and ask, what about p instead of h?, or my favorite, div instead of p? And I've seen these in recently released books. For too many people who are formatting books the only thing that matters is if it looks good in an ereader.
But it doesn't look good in a lot of cases. And if the code is not good, that makes it more difficult to fix the formatting.

I do not like <div> when <p> should be used. I do not like it when extra useless <div> is used when all that needs to be done is fix the chapter header class. Why do we need a <div> to define the top margin of a chapter when the net like is a <p>? The rule is to keep it simple and I've seen way too many eBooks that do not keep it simple. Remove all unused classes and hundreds of classes are removed. I agree that an <h2> should be used for chapter headers, but I'm not all that bothered enough to swap the <p>. Another thing I dislike is <span> for bold or italic.

But then, I like simple. It's not hard to make an eBook look good and have good code.
JSWolf is offline   Reply With Quote
Old 06-11-2020, 04:43 PM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by hobnail View Post
Can we broaden the question and ask, what about p instead of h?, or my favorite, div instead of p? And I've seen these in recently released books. For too many people who are formatting books the only thing that matters is if it looks good in an ereader.
At some point in time, at some point in space, you'd run into trouble using those, semantically, or for those who are visually impaired using read-aloud, etc. I mean, if you don't tell a heading that it's a heading, it's "wrong" structurally, at the very least. How would it know what to say to the person to whom it's reading? "Big text paragraph?" Rather than heading?

Ditto muddling paragraphs with divs.

Hitch
Hitch is offline   Reply With Quote
Old 06-11-2020, 10:10 PM   #13
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by hobnail View Post
...For too many people who are formatting books the only thing that matters is if it looks good in an ereader.
There will always be people who don't know the 'right' way to do something, and just 'git er done.

There have to be people in the world that LIKE pushing a wet noodle up a hill, instead of learning to do it the right way.... otherwise we wouldn't have people to laugh at!
Turtle91 is online now   Reply With Quote
Old 06-12-2020, 05:18 AM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
At some point in time, at some point in space, you'd run into trouble using those, semantically, or for those who are visually impaired using read-aloud, etc. I mean, if you don't tell a heading that it's a heading, it's "wrong" structurally, at the very least. How would it know what to say to the person to whom it's reading? "Big text paragraph?" Rather than heading?

Ditto muddling paragraphs with divs.

Hitch
I've seen a lot of eBooks that don't quite code the way they should. Most eBooks use <p> for the chapter headers. Most use a <div> to simulate a <blockquote>. Most use a class with <p> where just <p> is appropriate. Some use a <span> for bold and/or italic. So it's no wonder a text-to-speech program cannot get the correct inflections when it doesn't know what it's reading isn't just plain text. Also, using <em> and <strong> (IMHO) is wrong if you just want italic and bold.
JSWolf is offline   Reply With Quote
Old 06-12-2020, 06:27 AM   #15
Sarmat89
Evangelist
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
h element is useless.
It was intended for manuals, which use hierarchical headers, like
0.1 Introduction
Books, even non-fiction, do not use hierarchical headers; headers in books are complex structures which span several paragraphs. p is the only logical choice.

Also, div is used instead of p to fix the extra space between paragraphs.
Sarmat89 is offline   Reply With Quote
Reply

Tags
semantic markup


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Span Span Span Sigil cleaning up indesign blackest Sigil 31 12-06-2017 10:16 AM
Span Span Span Span MULTIVAC ePub 7 12-06-2014 08:58 AM
Nested Span? Turtle91 ePub 4 05-20-2013 02:47 PM
span in span: is this problematic? tbuyus ePub 8 03-31-2013 08:01 AM
Remove <br /> together with span, and only span Razzia Recipes 3 05-30-2011 06:55 PM


All times are GMT -4. The time now is 01:28 PM.


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