boxWidth = document.createElement('input') boxWidth.setAttribute('type','text') boxWidth.setAttribute('id','boxWidth') boxWidth.setAttribute('value','20') boxSize = document.getElementById('boxSize') boxSize.append(boxWidth)