Build a page: html, head, body
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.
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>
| Part | What the browser does |
|---|---|
| head | reads it, shows nothing on the page |
| title | puts the words on the tab |
| link | loads the style file |
| body | shows what is inside it |
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.