A small refactor to improve HTMLFormat, to help to prevent low-level mistakes. And fix #33141, fix #33139