HTML marks the role of text. <p> and </p> are opening and closing tags. Together with the text between them, they form an element: a box with contents. Let’s read one line at a time.
h1 — heading · p — paragraph · ul — list · li — item
Choose a line to see its role. Pressing Enter alone does not add a list item.
How it looks in a browser
h1 is the main page heading. The / in </h1> closes it.
Why it works this way
h1 gives text a role, not a fixed font size. A heading can have small letters and remain a heading. The / before the same name, h1, marks its end.
Need the terms explained?
<p>My idea</p>
A tag is a marker; an element is the whole unit
Think of a box with something inside. <p> marks the start, </p> marks the end, and “My idea” sits between them. The two markers are tags. The whole unit, including the text, is a p element: a paragraph.
<h1>A heading</h1>
The slash marks the closing tag
The opening tag is <h1>. The closing tag adds / before the name: </h1>. The name stays the same. In this lesson, we explicitly close h1, p, ul and li so their boundaries are easy to see. Later you will meet elements that do not need a closing tag.
<h1>My workshop</h1>
<p>I build shelves here.</p>
Meaning first, appearance second
h1 marks the main heading of our page; p marks an explanatory paragraph. Browsers usually display them differently, but styles can change their font size. Choose h1 because the text is a heading, not because you want large letters.
<ul>
<li>Tape measure</li>
<li>Pencil</li>
</ul>
The list is the box; the items go inside
ul groups an unordered list. Each li inside it is a separate item. There are two li elements here, so there are two items. Use this kind of list when rearranging the items does not change the meaning. We will use ol for a meaningful order later.
<ul>
<li>Measure the wall</li>
</ul>
Nesting: close from the inside out
The li sits inside the ul, like a small box inside a larger one. In our examples, we close </li> before </ul>. Leading spaces help you see the nesting. The tags create the relationship; the spaces do not.
<li>A book about space
and notes about stars</li>
Enter does not create another item
The text uses two lines in the editor, but both lines are inside one li. That means one item. Line breaks and indentation make source code easier to read; a separate list item needs a separate li element.
CHECK YOUR PREDICTION
Before running the code, predict how many items this list contains.
<ul>
<li>A book about space
and notes about stars</li>
<li>A short story collection</li>
</ul>
Time to use the keyboard
10 MINUTES · TRY
01
Introduce your first project
Describe your idea: what will you make, and where will you start?
Exactly one h1 with the text “My first project”.
Use a p to explain your idea, with at least 12 letters or digits. Spaces and punctuation do not count.
A ul has exactly three li items directly inside it. Each describes a step using at least 3 letters or digits. Put the step text inside li.
This exercise uses tags without attributes. No installation or API keys needed.
index.htmlHTML
Browser result● preview
The preview updates after a check. Your practice code stays in your browser.
Mistakes are welcome. You won’t lose points.
FIND THE CAUSE
We wanted one list with one item, but the li is outside it. Which change restores the intended nesting?
<ul>
</ul>
<li>Measure the wall</li>
The code works. Why?
EXPLAIN
CHECK YOUR UNDERSTANDING
Why does a heading need an h1 tag?
First complete the task and answer the question.
Make your own reading list
~ 10 min
02
Same tags, new task
Build a list of things you want to read. Try without the example first.
Exactly one h1: invent a reading-list heading using at least 3 letters or digits.
Use a p to explain why you want this list, with at least 12 letters or digits. Spaces and punctuation do not count.
One ul contains exactly three li items naming books, articles or topics, each with at least 3 letters or digits. No nested or outside li items, or text between items.
You can revisit the example or open a hint.
reading-list.htmlHTML
Your list in the browser
Preview updates after checking.
Why use a separate li for each book? What changes if you keep only line breaks?
Your note is saved in this browser. It is not automatically graded.
Compare with the self-check questions
Did you explain that ul groups the whole list and each li marks one separate item?
What happens if you remove li and leave the titles on separate lines inside ul? The text may remain visible, but there will be no separate list items.
Do h1 and p make clear what you plan to read and why? You judge this: the automatic checker sees structure and text length.
For next time: two review questions
Answer from memory before opening each explanation.
How many tags and elements are in <p>My idea</p>?
Two tags: <p> and </p>. Together with the text, they form one p element. The words “My idea” are content, not another tag.
You press Enter twice inside one li. How many items are there now?
One. There are new line breaks in the source code, but no new li elements. Another item needs another li inside the shared ul.
How to ask AI for a useful hint
“Do not write the solution. Ask one question to help me find the mistake.” After the hint, explain your fix in your own words.
A ROUTE WITH CLEAR STEPS
Towards data. With a solid foundation.
Start with a short web foundation, then move into Python and analysis. Practice sets the pace, not a date on the calendar.
The first HTML lesson is available now. Later steps are a plan, not a finished course catalog. PHP and deeper web development will form a separate path.
BUILD SKILLS WITHOUT FALLING BEHIND
Your growth, shown through practice.
Tasks passed0of 2 practical tasksExperience earned0 XPRepeats do not add extra pointsDays with practice0They don’t have to be consecutive
What you have checked
The bar shows completed actions in the starter module. It does not measure your mastery of a language.
HTML · page structure0 / 3
Python · working with dataPractice is ahead
SQL · querying tablesPractice is ahead
Applying what you learned
These are the results of three specific tasks. A correct answer marks an action completed at least once; it does not prove HTML mastery. Previous achievements are preserved.
Optional. The jokes target excuses, never your worth. You can turn this off at any time.
After a break
Your achievements stay. Spend five minutes revisiting the example, then continue from where you left off.
Your progress stays with you
Your code, mentor mode and achievements are stored only in this browser. Your phone will have separate progress. To transfer it, download a backup and restore it on another device.
Clearing site data removes local progress. No email address or account is needed for now.