1. HTML Document
As you probably already know, all websites on the internet consist of web pages
. They’re often called HTML pages. So, what’s this beast all about?
An HTML document is a text file that consists of text and tags. Tags were invented back in the 70s to allow people to add some helpful info
for programs working with those documents.
A tag is a key (service) word, usually in English, that’s wrapped in angle brackets (the 'greater than' and 'less than' symbols) so programs won’t confuse a tag with regular words.
Example:
<img>
Also, a tag can include additional helpful info that's useful for a program processing the document.
2. Example of an HTML Document
The most popular program for working with tags is the browser. Everything your browser displays is the result of processing those tags within an HTML document.
Let’s say the browser displays this page for you:
Pallas's CatPallas's Cat is a carnivorous mammal from the cat family. Its appearance and size resemble a house cat, but it differs with a shorter, more robust body, shorter legs, round pupils, low ears, and a long, thick fur coat. ![]() |
Here’s what its HTML document would look like:
<h1>Pallas's Cat</h1>
<p> Pallas's Cat is a carnivorous mammal from the cat family. Its appearance
and size resemble a <a href="#">house cat</a>, but it differs with a shorter, more
robust body, shorter legs, round pupils, low ears, and a long, thick fur coat. </p>
<img src="manul.jpg">
In this example, we see text and tags: h1
, p
, a
, and img
. The browser recognized the tags and turned the text within them into a heading, a link, and even added an image below the text. Pretty magical, right?
GO TO FULL VERSION