fixed 1, 3, 4, 5 from http://gsd.uwaterloo.ca:8888/question/730/html-rendering-errors