Skip to content

Learn online at your pace

Code Safari: Build Your First Website

1.1 Your first web page (notes)

Free preview

Every website you have ever visited is built with HTML. HTML stands for HyperText Markup Language. It tells the browser what each part of a page is: a heading, a paragraph, a picture or a button.

What you will learn

  • HTML is made of tags. A tag sits inside angle brackets, like <p>.
  • Most tags come in pairs: an opening tag <p> and a closing tag </p>. The closing tag has a slash.
  • Opening tag + content + closing tag = an element. <p>Hello</p> is a paragraph element.
  • Every page starts with <!DOCTYPE html>. It tells the browser: this is a modern HTML page.
  • <html> wraps the whole page. <head> holds information about the page. <body> holds everything you can see.
  • <title> goes inside the head. It is the name you see on the browser tab.
  • A comment <!-- like this --> is a note for humans. The browser ignores it.

Example code

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <!-- This is a comment. The browser will not show it. -->
    <h1>Hello, I am a coder!</h1>
    <p>This is my very first web page.</p>
    <p>I am learning HTML with Kodi the chameleon.</p>
  </body>
</html>

Try it: copy the example into Kodi's Playground (download it from lesson 1.1) and press Run.

Challenge

Change the heading to say your name. Then add a third paragraph about your favourite food. Press Run to see it.

Fun fact: The first website ever made went online in 1991. It is still online today!