skip to Main Content

Html – How to add id to each element in this case?

Given this code: var words=['ac', 'bd', 'bf','uy','ca']; document.getElementById("wordTable").innerHTML=arr2tbl(2); function arr2tbl(ncols){ return words.reduce((a,c,i)=>{ if(i%ncols==0)a.push([]); a.at(-1).push(c); return a; },[]).map(r=>"<tr>"+r.map(c=>`<td>${c}</td>`).join("")+"</tr>").join("n"); } <table id="wordTable"></table> the code prints out this table <table> <tr> <td>ac</td> <td>bd</td> </tr> <tr> <td>bf</td> <td>uy</td> </tr> <tr> <td>ca</td><td></td> </tr> </table> But…

VIEW QUESTION

Why is my CSS stylesheet not linking well with my html document?

I don't know why the HTML document doesn't update with the CSS properties <!DOCTYPE html> <html lang="es"> <head> <title>Quen Somos?</title> <link rel="stylesheet" type="text/css"href="./quen-somos.css"> <link rel="icon" type="image/x-icon" href="../IMAXES/Estrela.png"> <meta name="keywords" content="Erguer, Galiza, organizaciĆ³n estudantil, ANC, 2016, sindicato de estudantes"> <meta charset="Utf-8">…

VIEW QUESTION
Back To Top
Search