☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

My digital project (1): files and HTML

الأسبوع 10 · الدرس ٣ «مشروعي الرقمي لمدرستي» (١): مجلد المشروع وكود HTML للصفحتين وشرحه · 3 دروس
2

Build a page: html, head, body

ICT Prep 2 Term 1, Unit 2, Lesson 3: pp. 64–69
GoalRead the skeleton of a page and say what the browser does with each part.
New words
opening tag · the first tag of an element, such as <h1>closing tag · the tag with a slash that ends an element, such as </h1>head · the part with information about the page that is not shown on the page itselfbody · the part that the browser shows on the screen
Explanation

Every page has the same skeleton. The html element wraps everything. Inside it, the head holds information about the page: the title, which shows on the browser tab, and the link line that connects the page to style.css. The body holds what people see: headings, paragraphs and so on. Most elements have an opening tag and a closing tag with a slash, like <h1> and </h1>. The closing tag tells the browser where the element ends. If you forget it, the browser may not know where one part stops and the next begins. A real page has a few more lines than ours; ask your teacher about them. Read the picture and say what the browser does with each line.

Html
1<html>
2<head>
3  <title>About the club</title>
4  <link rel="stylesheet" href="style.css">
5</head>
6<body>
7  <h1>Robots Club (example)</h1>
8</body>
9</html>
Worked examples
PartWhat the browser does
headreads it, shows nothing on the page
titleputs the words on the tab
linkloads the style file
bodyshows what is inside it
Line by line: html starts the page. title puts “About the club” on the tab. link connects the style file. body begins what is shown. h1 shows the main heading Robots Club (example). The closing tags end each part.
Salma writes <h1>Robots Club (example) but forgets </h1>. The browser thinks everything after it is still part of the heading, so the whole page looks like a huge heading. Adding the closing tag fixes it.
Class activity

Copy the skeleton on paper. Colour the head in one colour and the body in another. Then underline all the opening tags and circle all the closing tags. Write what the browser does with the title. No device is needed.

Practice
1
Which part of a page is shown on the screen, head or body?
2
What does the title do?
3
Which line connects the page to its style file?
4
Why does an element need a closing tag?