Thread:Project:Support desk/using HTMLForm class vs adding HTML directly

Hello,

When building custom forms in wikimedia specialpages, you have the option to directly inject your own HTML into the page, or use the mediawiki HTML form builder class. My question is, what are the advantages of using the built in form builder vs just injecting the HTML using getOutput->addHTML ? Thanks.