📖 Scenario: You want to make a simple webpage that shows a list of your favorite fruits. This list should be easy to read and clearly separated.
🎯 Goal: Build a basic HTML page that includes an unordered list with three fruit names.
📋 What You'll Learn
Use semantic HTML5 structure with <html>, <head>, and <body> tags
Include a <title> in the head
Create an unordered list using <ul> with exactly three list items <li>
Each list item must contain one fruit name: Apple, Banana, Cherry
💡 Why This Matters
🌍 Real World
Unordered lists are used on websites to show groups of items like features, steps, or menus in a clear, easy-to-read way.
💼 Career
Knowing how to create and structure lists is a basic skill for web developers to organize content effectively and improve user experience.
Progress0 / 4 steps
1
Set up the basic HTML structure
Write the basic HTML skeleton with <html lang="en">, <head> containing <meta charset="UTF-8"> and <title> with text Favorite Fruits, and an empty <body>.
HTML
Hint
Remember to include <html lang="en"> and a <title> inside the <head>.
2
Add an unordered list container
Inside the <body>, add an unordered list element using <ul> to hold the fruit items.
HTML
Hint
Use the <ul> tag to create an unordered list container inside the body.
3
Add list items for fruits
Inside the <ul>, add three list items using <li> tags with the exact text: Apple, Banana, and Cherry.
HTML
Hint
Use three <li> tags inside the <ul> with the fruit names exactly as given.
4
Add a heading above the list
Above the <ul>, add a heading using the <h1> tag with the text My Favorite Fruits.
HTML
Hint
Use the <h1> tag to add a main heading above the list.
Practice
(1/5)
1. What HTML tag is used to create an unordered list?
easy
A. <li>
B. <ol>
C. <ul>
D. <list>
Solution
Step 1: Understand list types in HTML
<ul> creates unordered lists with bullet points, while <ol> creates ordered lists with numbers.
Step 2: Identify the correct tag for unordered lists
The tag <ul> is specifically for unordered lists.
Final Answer:
<ul> -> Option C
Quick Check:
Unordered list tag = <ul> [OK]
Hint: Unordered lists always start with <ul> tag [OK]
Common Mistakes:
Confusing <ul> with <ol>
Using <li> as the list container
Using non-standard tags like <list>
2. Which of the following is the correct syntax to create a list item inside an unordered list?
easy
A.
Item
B.
Item
C.
Item
D.
Item
Solution
Step 1: Identify the correct tag for list items
List items must be inside <li> tags.
Step 2: Check the correct nesting of tags
The <li> tags go inside the <ul> tags, not the other way around.
Final Answer:
<ul><li>Item</li></ul> -> Option B
Quick Check:
List item inside <ul> uses
[OK]
Hint: List items always go inside <li> tags within <ul> [OK]
Common Mistakes:
Swapping <ul> and <li> tags
Using <item> instead of <li>
Using non-standard <list> tag
3. What will be the visual output of this HTML code?