Skip to content

Instantly share code, notes, and snippets.

@tarrsalah
Created October 17, 2018 15:47
Show Gist options
  • Save tarrsalah/cee13f603ea16e3abc552ed306b37f23 to your computer and use it in GitHub Desktop.
Save tarrsalah/cee13f603ea16e3abc552ed306b37f23 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Document</title>
</head>
<body>
<table>
<tr>
<td id="first"></td>
<td id="second"></td>
</tr>
</table>
</body>
<script>
var firstCell = document.getElementById('first');
var secondCell = document.getElementById('second');
var image = document.createElement('img');
image.src = 'https://clgraphics.files.wordpress.com/2013/05/picture.gif'
var list = document.createElement('ul');
var el = document.createElement('li');
var el_text = document.createTextNode('element one');
el.appendChild(el_text);
list.appendChild(el)
firstCell.appendChild(image);
secondCell.appendChild(list);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment