Amazon Interview Question

Code an html DOM using a recursive tree