HTML: Combining cells inside rows and columns
Instructions
Tips
Loading...
Your exercise will be checked with these tests:
const { test } = require('tests');
test(({ querySelectorAll, query, expect }) => {
const trs = querySelectorAll(document, 'table > tbody > tr', HTMLElement);
expect(trs).to.have.length(1);
const trHead = querySelectorAll(document, 'table > thead > tr');
expect(trHead).to.have.length(1);
const tds = querySelectorAll(document, 'table > tbody > tr > td', HTMLElement);
expect(tds).to.have.length(2);
const tdWithColspan = query(document, 'table > tbody > tr > td:nth-child(1)', HTMLElement);
expect(tdWithColspan).to.have.attribute('colspan', '2');
});
Teacher's solution will be available in:
20:00
