View Single Post
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