In the previous module, we learned how to add text, headings, and paragraphs to a webpage.
In this module, we will learn how to create lists and links. Lists help us organize information, while links help us move from one webpage to another.
A list is a collection of items written one after another.
For example, when your teacher writes school supplies on the board, that is a list.
Imagine making a shopping list with your parents. Lists help us keep things organized.
An unordered list uses bullet points. We create it using the <ul> tag.
<ul>
<li>Football</li>
<li>Basketball</li>
<li>Swimming</li>
</ul>
An ordered list uses numbers. We create it using the <ol> tag.
<ol>
<li>Wake Up</li>
<li>Brush Teeth</li>
<li>Go To School</li>
</ol>
Think of an ordered list as instructions for building a toy. The steps must be followed in the correct order.
A nested list is a list inside another list.
<ul>
<li>Fruit
<ul>
<li>Apple</li>
<li>Orange</li>
</ul>
</li>
</ul>
Nested lists help us group similar items together.
A hyperlink is a clickable piece of text that takes you to another webpage.
We create hyperlinks using the <a> tag.
<a href="https://www.google.com"> Visit Google </a>
Think of a hyperlink as a magical door. When you click it, it takes you somewhere else.
External links take visitors to another website.
<a href="https://www.wikipedia.org"> Visit Wikipedia </a>
Clicking the link opens the Wikipedia website.
Internal links connect pages within your own website.
<a href="about.html"> About Me </a>
This link opens another page inside your website.
Imagine a school with many classrooms. Internal links are hallways that connect one classroom to another.
HTML can create links that open an email program.
<a href="mailto:teacher@example.com"> Send Email </a>
Clicking the link opens an email window.
<!DOCTYPE html>
<html>
<head>
<title>My Favourite Things</title>
</head>
<body>
<h1>My Favourite Things</h1>
<h2>Favourite Foods</h2>
<ul>
<li>Rice</li>
<li>Pizza</li>
<li>Chicken</li>
</ul>
<h2>My Daily Routine</h2>
<ol>
<li>Wake Up</li>
<li>Go To School</li>
<li>Do Homework</li>
</ol>
<a href="https://www.google.com">
Visit Google
</a>
</body>
</html>
Fill in the blanks:
Create a webpage called myfoods.html.
Add:
Fix the missing tags below:
_____
_____ Football _____
_____ Basketball _____
_____ Tennis _____
_____
Use:
Create a webpage called myschool.html.
Include: