Exercise: Using the DOM
Complete the code so that the page created looks like the image provided.
Note:
Hints:
- undefined
Solution to the exercise
Here is one possible solution.
Note:
Hints:
- undefined
1
2
var bodyNode = document.body;
var tableNode = document.createElement("table");
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
table {
border-collapse: collapse;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX