HTML creating and var declaration