← 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>
= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics:
HTML DOM
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.