build HTML preamble