انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents
Robo Web: home
0. Lab tour1
1. HTML: the page's content7
2. CSS: the page's look6
3. JavaScript: the actions7
4. The project: the to-do list3
5. Pro CSS: shadows and movement5
6. Arrays and building the page with code3
7. Events and forms3
8. Objects and time3
9. Canvas: drawing and games3
10. The final project: the memory game3

The title and the paragraph

Section 1: HTML: the page's contentLesson 1.2 · ⏱ 7 min

HTML is written with tags: every tag opens like <p> and closes like </p>. <h1> is a big title, and <p> is a paragraph.

HTML
<h1>Sara</h1>
<p>I am 11 years old and I love robots.</p>
CSS
body { font-family: Tahoma; }
🖥️ The page in Robo Web:The page in Robo Web

📌 Another example: titles in three sizes

h1 is the biggest title, then h2, then h3. And under every title a paragraph.

🌐 Titles in three sizes
HTML
<h1>My trip</h1>
<h2>Day one</h2>
<p>We visited the pyramids.</p>
<h3>Note</h3>
<p>It was very hot.</p>
CSS
body { font-family: Tahoma, sans-serif; }
🖥️ The page in Robo Web:The page in Robo Web
✍️ Practise
The title and the paragraph.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

An h2 title with a paragraph under it.

👀 Show the solution
🌐 Solution
HTML
<h2>My hobby</h2>
<p>I love riding my bike.</p>
CSS
body { font-family: Tahoma, sans-serif; }
🖥️ The page in Robo Web:The page in Robo Web

Result: a middle-sized title and a paragraph.

Medium

A poem of three lines in one paragraph: use <br> to go down a line.

👀 Show the solution
🌐 Solution
HTML
<p>
The sun comes up every morning<br>
And the bird sings in the tree<br>
And I code my robot
</p>
CSS
body { font-family: Tahoma, sans-serif; }
🖥️ The page in Robo Web:The page in Robo Web

Result: three lines in one paragraph.

Hard

A story page: an h1 title, then two chapters, each with an h2 and a paragraph.

👀 Show the solution
🌐 Solution
HTML
<h1>The robot's story</h1>
<h2>Chapter 1</h2>
<p>Ali made a small robot.</p>
<h2>Chapter 2</h2>
<p>The robot learned to dance.</p>
CSS
body { font-family: Tahoma, sans-serif; }
🖥️ The page in Robo Web:The page in Robo Web

Result: a big title and two chapters.

Finished the lesson? Mark it so your progress counts.