document.write("<table>"); for(var row = 1; row < 10; row++) { document.write("<tr>"); for(var blank = 9 - row; blank > 0; blank--) { document.write("<td></td>"); } for(var column = row; column > 0; column--) { document.write("<td class='content'>" + row + "x" + column + "=" + row * column + "</td>"); } document.write("</tr>"); } document.write("</table>");
table td.content { border: 1px solid skyblue; }