Separating html and javascript