refactoring the subclass HTML