This course has already ended.

First dive into HTML

Introduction

In these short exercises, we will learn the very basics of HTML. It might sound a bit scary if you have no or very little programming experience but writing HTML is not actually programming but rather writing markup!

We’re going to provide links to all the necessary resources and information about the exercises. You’ll just need to first read information behind the link and then answer to a short quiz.

Exercises

Headings

How many heading levels are available in HTML?

How would you define a level two heading with text Hello World!?

How would you create a horizontal rule in HTML?

How would you define a level one heading with content of Tampere University?

Paragraphs

What tag defines a paragraph in HTML?

How would you create a paragraph with text Hello World?

How would you start a new line inside <p> tag?

How would you create a paragraph with text Hello in line 1 and World in line 2?

Formatting text

How would you create bolded text TUNI?

How would you create text TUNI in italics?

How would you create small text TUNI?

How would you create marked/highlighted text TUNI?

How would you create subscripted text TUNI?

Text editor

The course staff recommends using Visual Studio Code. It widely used free and open source text editor. You can extend the basic functionalities by installing extensions.

You should now install VS Code from this link. See docs for help with getting started.

There are two possible ways of viewing HTML files. First one is to open the file from file browser using a browser. The other (and recommended) one is to install extensions for VS Code.

Open up the Extensions tab from the left side of the VS Code. Familiarize yourself with the Debugger of VS Code tool, Run tab.

Once you’ve installed VS Code and extensions create a new file index.html and paste the following content to it:

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Hello World page</title>

</head>

<body>

<h1>Hello World!</h1>

</body>
</html>

With file still open in your editor press F5 to start debugging and select Chrome. The continuation seem to depend on what file happens to be open. If JavaScript file is open VSCode will open a launch.json file to your editor. Copy and paste following to the launch.json:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch index.html",
      "type": "chrome",
      "request": "launch",
      "file": "${workspaceFolder}/index.html"
    }
  ]
}

Selecting Launch index.html should open up Chrome and load your index.html.

Attention

Following instruction should work on Windows. If you have Chromium on Linux you’ll have to define the path to your installation to launch.json.

Find installation path by typing which chromium. Add following line to each configuration "runtimeExecutable": "INSTALLATION PATH". Remember to write valid JSON. For example:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch index.html",
      "type": "chrome",
      "request": "launch",
      "file": "${workspaceFolder}/index.html",
      "runtimeExecutable": "/snap/bin/chromium"
    }
  ]
}

Did you manage to install an editor and view the index.html in your browser?

Posting submission...