html + css + js, dimensions variable