Step 2

  • The browser understands Hyper Text Markup Language, or HTML.

  • Create an empty file and call it index.html

  • Open the file in your favorite text editor!

The extension of your file must be html. The name, index, is just a convention for naming the landing page of websites.

  • HTML document is essentially a text file organized into sections. Each section is contained within <tagname>...</tagname> and is called an HTML element. Here is the minimal structure:
<html>
  <head>
    <!-- meta data about the page -->
  </head>
  <body>
    <!-- content of the page -->
  </body>
</html>
  • Note that HTML elements can be nested.

HTML is fairly easy and you will pick it up as we progress through the course. Please see the Appendix for more information.

  • Copy the following to your index.html
<html>
  <head>
    <title>SleepTime App</title>
  </head>
  <body>
    <p>Hello world!</p>
  </body>
</html>
  • Open index.html in your favorite browser.