Functional gui in html5