added generic handling of <div> and <p>