DEV Community

Muhammad Huzaifa
Muhammad Huzaifa

Posted on

How to properly use the grid templates in javascript

// JavaScript
// Get The Elements
const container = document.querySelector('#container');
const info = document.querySelector('#info');
const boxes = document.querySelector('#boxes');

// Get The DOM
const numHeading = document.createElement('h2');
const getNum = document.createElement('input');
const button = document.createElement('button')


getNum.setAttribute('type', 'number');
getNum.setAttribute('min', '1');
getNum.setAttribute('max', '64');
numHeading.textContent = 'Choose The Grid Size';
button.textContent = 'Start';

info.append(numHeading,

Top comments (0)