Add function for html5