SonarHTML does not support custom rules.
If you want to code your own rules for HTML, I suggest you to create a separate plugin which only executes your checks and doesn’t create incompatibilities with SonarHTML.
Your plugin:
- should have its own plugin key (and not use the same one as SonarHTML)
- should not declare the HTML language
- should not feed SonarQube with metrics which are computed by SonarHTML
Please see the documentation on how to develop a plugin.