Why have all this HTML being constructed in code vs requiring in a template text fragment?