Fix #6901. Would generate invalid HTML5.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>