factored out html boilerplate code