I am trying to write a selector that selects everything within a p
However, the HTML I am trying to select from does not close the p, instead it uses a /br like this:
<p>Some Text Here</br>
<p>Some more text</br>
When I use a selector that is just p, it selects Some Text Here Some more Text, not the two individual elements.
Is there any way to write a selector that will match both elements??
Note: I am NOT in control of this HTML, but yet I need to parse it
Although it’s sloppy markup, the browser will parse it just fine as it is. Since paragraphs can’t be nested, the browser will put an implicit closing tag before the second p and at the end of the body for the second p.
http://jsfiddle.net/KpJNH/1/