Fix broken/inconsistent html: <p>/<ul> nesting

Namely, <ul>s don't nest inside <p>s.  Code had this right
in places, wrong in others.