reorganize html structure