I don't see why not (if you must) but doesn't the html element type allow you to add a class name? I can't remember.
General developer forum
Can you use a .html file in $mform->addElement('html', ...)?
Denne diskusjonen har blitt stengt, og du kan derfor ikke svare i den lengre.