apply html structure to underlying data