โ Back to HTML DOM
Question 18
Create List with Multiple Items
Create List with Multiple Items
Create an unordered list (<ul>) with three list items containing "Apple", "Banana", and "Orange". Append the entire list to the div with id="fruitContainer". Platform-Provided HTML (READ-ONLY): <div id="fruitContainer"> </div> Steps: 1. Create a <ul> element 2. Create three <li> elements with the fruit names 3. Append each <li> to the <ul> 4. Append the <ul> to the container
Expected Output:
<div id="fruitContainer">
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ul>
</div>Topics:
HTML DOM
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.