html smart preview - diff logic(header file)