makeHtml simplification contributed by nachti via TeachingMaterial