Generates a nested Html unordered or ordered list.