3 ms·
It's a paragraph, not a div, the intent is clear by definition.
by AlienRobot 3y ago
It's a paragraph, not a div, the intent is clear by definition.
- toyg 3y agoThe intent at the beginning of the paragraph, but not at the end. Is an IMG meant to be in the paragraph? Is a SPAN? They are inline elements that can indeed be inside a P. I honestly don't understand this level of laziness in 2023. Editors close tags automatically, ffs. For the sake of saving a keystroke or two we end up with unintuitive and ambiguous crap.
- bentley 3y agoIf I didn’t intend the img or span to be in the paragraph, I would have closed the <p>. The act of leaving the <p> open is what demonstrates that my intent is for the img to remain inside.
- toyg 3y agoAnd now you have a tag that is sometimes closed and sometimes open, forcing me to scan the entire document to figure if you've ever closed this bloody thing - as opposed to knowing that you will eventually close it, and that anything I see until then is inside the P.
- AlienRobot 3y agoYou won't need to scan the entire document because pretty much anything can make the P tag close, including closing the element containing it.