building the tag object for html genration