change html output

I think that reducing `echo`s make the code easier to "read".