Generate correct markup