Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2018, 06:22 AM   #46
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: 76,104
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
To me, divs look like ugly code where a p would do.
JSWolf is offline   Reply With Quote
Old 02-27-2018, 06:47 AM   #47
sjfan
Addict
sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.
 
Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
Quote:
Originally Posted by Hitch View Post
Divs and ps are both block-level elements; they can contain other elements, and frequently do. It's not like you're talking the difference between one element that's a block and one that's an inline, here. A div is a container, pretty much--and arguably, for all intents and purposes, so is a paragraph. A paragraph contains text; it can contain images, etc.
As far as being a container goes, they are different: a div can contain other block elements. A p cannot.

To me, div is better style in this case. The major difference (aside from the functional one I just mentioned) is that p connotes that the contents are a paragraph, semantically. That’s not the case here, so div is a little better in terms of expressing what’s meant. But that’s just a style difference; neither one is wrong per se.
sjfan is offline   Reply With Quote
Advert
Old 02-27-2018, 12:40 PM   #48
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,471
Karma: 100408738
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by sjfan View Post
As far as being a container goes, they are different: a div can contain other block elements. A p cannot.

To me, div is better style in this case. The major difference (aside from the functional one I just mentioned) is that p connotes that the contents are a paragraph, semantically. That’s not the case here, so div is a little better in terms of expressing what’s meant. But that’s just a style difference; neither one is wrong per se.
I suspect that this is a good part of the underlying cause for the ugliness that JSWolf sees.

Intuition is sometimes difficult or seems unnecessary to articulate.
j.p.s is offline   Reply With Quote
Old 02-27-2018, 01:58 PM   #49
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,482
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 JSWolf View Post
To me, divs look like ugly code where a p would do.
Jon, yes, we know that. :-) One good thing about you, my Resident Curmudgeon, is that we always know exactly where you stand.

Quote:
Originally Posted by sjfan View Post
As far as being a container goes, they are different: a div can contain other block elements. A p cannot.
Yes, of course. I never said otherwise. And if a given section of a book, big, small or otherwise, needs to contain other block elements, then anyone with a brain would use a div. No argument.

HOWEVER, all that being said, and while I would probably expect my guys to use paragraph classes for something akin to the Blueberry sign, there isn't some Lord High Almighty of eBook Coding, handing down judgements that those who use a p, rather than a div--or vice-versa--are all going to burn in Hell. That was my point. Unlike attempting to make a naked image element, sans an enclosing element, etc., there's no definitive right/wrong for this, in the given example. Unless someone here knows of one--I mean, a definitive, authoritative guide/whatever that says, "Thou Shalt Not Use Ps for This Versus Divs."

Quote:
To me, div is better style in this case. The major difference (aside from the functional one I just mentioned) is that p connotes that the contents are a paragraph, semantically. That’s not the case here, so div is a little better in terms of expressing what’s meant. But that’s just a style difference; neither one is wrong per se.
Yes, that was my point. I was actually trying to tamp down the inevitable "is too, is not!" discussion about the realities of THIS or THAT being "the right way." That's all.

Quote:
Originally Posted by j.p.s View Post
I suspect that this is a good part of the underlying cause for the ugliness that JSWolf sees.

Intuition is sometimes difficult or seems unnecessary to articulate.
The very reason that firm like mine typically never take cleanup jobs is because HTML is relatively fluid. Sure, most elements have fixed names, in terms of the name of the element, itself, e.g., p/div/img etc., but the classes certainly aren't, and for anything beyond the basics, there are different ways to accomplish the same thing. I've lost track of the number of ways I've seen people try to do things like a multi-level indent, in MOBI, for example; one using left-margin, one using that plus padding, one using nested blockquotes (which surely is not semantically correct, but I've used that kluge, too, back in the day), etc.

So, anyway, I'm sure that we can now all agree that despite having our personal preferences, the reality is, the PC Coding Police are not going to show up on our doorsteps and haul us away for using p's versus div's, or vice-versa, for layout elements like the Blueberries signage.

Really, that's kinda the only place I was trying to get to. Peace and Harmony on the Endnotes thread.


Hitch
Hitch is offline   Reply With Quote
Old 02-27-2018, 02:28 PM   #50
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
As is often the case, looks is in the eyes of the beholder. But on a technical level the accessibility factor is that "semantics trumps looks" and if accessibility is better then all is well. We may need to change our viewpoint.

Dale
DaleDe is offline   Reply With Quote
Advert
Old 02-27-2018, 03:21 PM   #51
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,482
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 DaleDe View Post
As is often the case, looks is in the eyes of the beholder. But on a technical level the accessibility factor is that "semantics trumps looks" and if accessibility is better then all is well. We may need to change our viewpoint.

Dale
I don't disagree, but at this moment in time, do we think that there's a semantic difference, in terms of accessibility?

Hitch
Hitch is offline   Reply With Quote
Old 02-27-2018, 06:09 PM   #52
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by Hitch View Post
I don't disagree, but at this moment in time, do we think that there's a semantic difference, in terms of accessibility?

Hitch
Good question. I don't yet have the answer but as the shift toward accessibility gains momentum I think there will be. A paragraph is just read but a div may provide the ability to apply semantics. I expect there will be a need for even more semantics. Time will tell.

Dale
DaleDe is offline   Reply With Quote
Old 02-27-2018, 08:09 PM   #53
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,482
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 DaleDe View Post
Good question. I don't yet have the answer but as the shift toward accessibility gains momentum I think there will be. A paragraph is just read but a div may provide the ability to apply semantics. I expect there will be a need for even more semantics. Time will tell.

Dale
I agree--I really was asking if anyone knew of anything on that front.

Hitch
Hitch is offline   Reply With Quote
Reply

Tags
endnote, epub, hide


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] epub2 output Doitsu Plugins 11 12-01-2021 04:17 PM
epub3 to epub2 AlanHK Sigil 11 08-09-2017 05:06 AM
EPUB2 to EPUB 3 errors Psymon ePub 38 03-12-2016 01:12 PM
EPUB2 and the DOCTYPEgate roger64 ePub 21 07-18-2014 07:49 PM
refined metadata in epub2? mzmm ePub 2 11-14-2012 01:52 PM


All times are GMT -4. The time now is 10:00 AM.


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