The Basics

What is HTML?

Hyper-Text Markup Language (HTML) is one of the main languages of the web. The main one, even.

HTML is what Web Browsers (like Google Chrome, or Safari) use to build and display web pages to us. HTML is stored in files and are composed of a number of "tags". These tags tell the browser what to do with the information inside the tags, and what sort of information it is. According to the HTML Specification, a basic "valid" HTML document might look something like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>Document</title>
</head>
<body>
  
</body>
</html>

This will display a blank page, which isn't too exciting, but there is still a bit going on here which we will explore more in the following pages. For now, the important thing to take note of is the tags. A tag is essentially anything wrapped in angled brackets (<>).

There are two types of tags. Normal Tags, and Self Closing Tags.

A normal tag is one in which there is an opening and closing tag, like this

<title>Document</title>

This Tag tells the browser what the title of our page is, which then gets displayed on the tab in the browser

This is a title tag, as we can see from the name in between the angled brackets. The first part (<title>) opens the tag, and the second part (</title>) closes the tag. Everything in between is the content (in this case, the word Document)

The other kind of tag is Self Closing tags. These are ones which fulfil whatever their role is without content, and so simply exclude it. The do not have a closing tag, because they self terminate, like so:

<meta charset="UTF-8" />

This Tag tells the browser what our character-set encoding is, so that it can display our text correctly.

We will explore more about tags and their role in web development in the coming pages.

Last updated