change element for html5 and encapsulate logic on service