I am new to programming and including JS and HTML. The course was given a task and I can not figure out how to cope with it.
In an empty HTML file (without using any tags in the body ), output a 3x3 table with the letters inside using a script. I can make a table in the body , but I do not understand how to insert it into the script and display it on the screen. Someone can explain or give direction.
I approximately understand that I need to use documents.body.innerHTML = ""; But I do not understand how to use it.
Here is the table code:
<table border=1 id="1"> <tr> <th> A </th> <th> B </th> <th> C </th> </tr> <tr> <th> D </th> <th> E </th> <th> F </th> </tr> <tr> <th> H </th> <th> I </th> <th> G </th> </tr>