refactor html5 example