![]() |
#16 | ||||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Yep. The 2nd is better + more correct + much easier to read. Spaces are a part of the entire "emphasis chunk" and are just as important! ![]() Imagine you had a long book title:
Of course, the 2nd is preferred. (It's also easier to imagine your italics/emphasis with a yellow highlight in the background! Would the space between words be included in your highlight?) - - - Side Note: One proofing trick you can do is temporarily use this CSS: Code:
i { background-color: yellow; } em { background-color: orange; } It'll help you as you're skimming through your book. ![]() - - - Does Punctuation Go Inside the <i> or <em>? Now, the more interesting example comes into play with punctuation! Do you include the ending commas/periods + exclamation/question/quotation marks inside of your <i> + <em>? It depends. But huge lean towards NO. See my famous examples from: where I colorized italics in RED + made it a larger font: Quote:
Code:
<i>Hamlet, Macbeth,</i> and <i>King Lear;</i> - - - * Although maybe we're not talking about Shakespeare, the famous author—maybe it's some Fakespeare guy who actually DID create a book called "Hamlet, Macbeth"! ![]() - - - What's This Text? <i> or <em>? Quote:
In the vast majority of cases, you can figure out author intended italics vs. emphasis. For example, see my "3. "Spellcheck List" for Search": where you can spit out a list of all (italics) in a book. And where I showed a similar application for acronyms/smallcaps:
Seeing them in list-form, you can quickly map 90%+ to their intended <i> or <em>. Just because you may have a hard time in the ambiguous 10%, doesn't mean you have to hold everything else back. - - - - - - Italics vs. Emphasis: Quote:
Quote:
![]() - - - - - - Should I Mark Italics Or Emphasis If I Can? Quote:
And remember: Think of Accessibility as a sliding scale from 0%->100%. As long as you are trying your best, and moving in the right direction, that's good enough. ![]() Like with HTML language (lang + xml:lang)... You don't have to mark up every single Greek or Chinese word in an English book. But if you do, that's nice! 25% of the "foreign words" marked up correctly is better than 0%! And if you properly mark your books up NOW, you'll auto-benefit when tools come out LATER. ![]() (Even from 2016->2023, the tools got so much better!) Are <i> and <em> the Same? No! Quote:
and other languages, like Hebrew:
and Arabic:
This was all discussed in extreme detail in:
Last edited by Tex2002ans; 04-07-2023 at 09:52 PM. |
||||||||
![]() |
![]() |
![]() |
#17 | ||
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Quote:
And, yes, you could use css to change <i> but then you would be negating any and all readers/apps/devices that inherently differentiate a visual font-slant <i> with an emphasis <em>. That is just bad coding... But again, as I have said multiple times, you do you. But please don't push your biases onto people here as if they were rules. State, clearly, that it is your personal choice/preference and it is not necessary based in fact, logic, or reality. |
||
![]() |
![]() |
Advert | |
|
![]() |
#18 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
I have one right from 2021: There are 31 <em>s and 187 <i>s: Quote:
![]() The Japanese person's emphasis marks will appear on different sides if they're reading top-down or left-to-right. The Arabic person will get their extra stretchy "father". - - - Side Note: For more Arabic emphasis, see this answer by Khaled Hosny: where he mentions how Arabic can use these as well: (Khaled is the creator of Amiri—a high-quality Arabic font—and does a ton of open source contributions, like LibreOffice + Harfbuzz—the text shaper now used in most OSes/programs.) - - - Quote:
The most commonly used use-cases tend to get baked into HTML + CSS. The whole point of upgrading things into HTML Elements is to make interoperability (and building toolchains/workflows on top of this) possible. Instead of people constantly hacking <div>s and <span>s and classes and do all sorts of crazy stuff... If you used <em>, then:
If you used <i class="em">, then:
If you used <i class="hervorhebungen"> in Danish, then:
Mark emphasis as <em>, and any/all languages/tools will know you meant emphasis, then can treat it appropriately. Last edited by Tex2002ans; 04-08-2023 at 12:48 AM. |
|||
![]() |
![]() |
![]() |
#19 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,530
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
In this particular case, it's probably open to interpretation, although I think a single thing is better. In other cases it's much more clear: Code:
"Excuse me, but that wasn’t Sons of the Dessert" Code:
"Excuse me, but that <*>wasn’t</*> <*>Sons of the Dessert</*>" |
|
![]() |
![]() |
![]() |
#20 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,745
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
delete post
Last edited by JSWolf; 04-08-2023 at 06:01 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,745
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
delete post
Last edited by JSWolf; 04-08-2023 at 06:07 AM. |
![]() |
![]() |
![]() |
#22 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,745
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What can you do with <em> that you cannot do with <i>? The answer is nothing. They are exactly the same. The only difference is that <em> was created when someone stupidly decided to dump <i>. Before they brought back <i>, you had to do <em>New York Times</em> until <i> was brought back and you could do <i>New York Times</i>.
You can style <i> and <em> the same. You can give them classes the same. No software reads <i> and <em> differently. In print, there is even less difference. In most cases <em> is used the same as <i> with no styling. I've not seen any eBook that uses <em> do anything with it other then italicize the text. |
![]() |
![]() |
![]() |
#23 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
It’s like he doesn’t even read the answer to his questions or the examples that he asks for… if it disproves his assertion it doesn’t exist. Because <em>he</em> hasn’t seen it, and you wouldn’t be able to tell the difference in a pBook (we ARE talking about eBooks on this forum are we not?) then it must not exist…
*shrug* I think he just likes to argue and just regurgitates the same disproven point. I’m out. |
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,745
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When has <em> ever been different to <i> outside of looking at the code?
|
![]() |
![]() |
![]() |
#25 | |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,247
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
It's absolutely correct to use <em> instead of <i> if the intention is emphasis. Italics is only a Western font thing (invented in Italy, hence the name), but emphasis does exist in some other systems. 1. I try to avoid italics <i> anyway as it slows reading and may not translate. 2. Certainly there are more situations where it's just a convention to use italics, but emphasis is a real thing. 3. It's true that the <i> was stupidly depreciated for a while and some ebooks incorrectly use <em> for all italics and <strong> for all bold, but that doesn't mean <em> and <strong> are pointless or wrong. They should be used when appropriate. 4. I'd use <em> or <strong> when appropriate. All italics, bold, emphasis, strong etc should be sparingly used in fiction and dialogue. |
|
![]() |
![]() |
![]() |
#26 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,530
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
![]() While you're at it, why use <span> or <sup>? You can get exactly the the same with <i> (and proper CSS). So just use <i> everywhere. Actually, you don't even need the the text, you can get it through <i> as well, as in this proof of concept: Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ops="http://www.idpf.org/2007/ops" xml:lang="es"> <head> <title><i> rules</title> <link href="css/title.css" type="text/css" rel="stylesheet" /> <style type="text/css"> i { font-style: normal; } .H::before { content: "H";} .d::before { content: "d";} .e::before { content: "e";} .l::before { content: "l";} .o::before { content: "o";} .r::before { content: "r";} .w::before { content: "w";} .space::before { content: " ";} .comma::before { content: ",";} .excl::before { content: "!";} </style> </head> <body> <p><i class="H"/><i class="e"/><i class="l"/><i class="l"/><i class="o"/><i class="comma"/><i class="space"/><i class="w"/><i class="o"/><i class="r"/><i class="l"/><i class="d"/><i class="excl"/></p> </body> </html> |
|
![]() |
![]() |
![]() |
#27 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39,075
Karma: 153098470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
One of the best one paragraph items I ran into on semantic vs. visual markup:
Quote:
|
|
![]() |
![]() |
![]() |
#28 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,421
Karma: 99236514
Join Date: Apr 2011
Device: pb360
|
|
![]() |
![]() |
![]() |
#29 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,064
Karma: 5450184
Join Date: Nov 2009
Device: many
|
In fact, entirely new html tags are being added just to make semantic meaning clearer for accessibility reading systems:
See: the latest html whatwg spec: https://github.com/whatwg/html/pull/7320 It is way past time for ebook developers to start creating truly accessible ebooks (dropping epub2 and its old html whenever possible) and start caring about semantics (IMHO). Last edited by KevinH; 04-08-2023 at 02:01 PM. |
![]() |
![]() |
![]() |
#30 | ||
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,247
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
Quote:
Also sematic markup potentially helps with translation. I know what "printed" (really embossed) Braille is like, but not what a terminal is able to do. Recorded audio (since 1890s) has made a huge difference, especially when tape came (cassettes are actually better than CDs for audio books in many ways and digital files may have device accessibility issues). |
||
![]() |
![]() |
![]() |
Tags |
semantic markup |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Semantic discussion on the phrase "Title Case" | DiapDealer | Sigil | 24 | 11-22-2017 02:48 PM |
Typo in Set Semantic ? | Bertrand | Editor | 1 | 04-06-2016 10:24 AM |
DTBook markup? | frquixote | Calibre | 10 | 03-05-2014 06:17 PM |
Markup for TTS? | jcsalomon | ePub | 4 | 06-19-2013 11:47 AM |
Semantic formating for simple poetry: any comments on my code? | sourcejedi | ePub | 12 | 04-22-2011 06:28 AM |