Maybe the questioner is also in full control of the HTML creation and they don’t need a parser for all possible HTML edge cases.