What's A Webpage?
In the last post I’ve written about web development, I came to the conclusion that a website is a directory located in a web server containing web documents.
However, a single category of web document is mandatory to make a website: webpages.
A webpage is a document written in a language called HTML (HyperText Markup Language) that can be read by a web browser and transformed into a human-friendly interface. A minimal webpage looks like this:
<!DOCTYPE html>
<html>
<head>
<title>My first webpage</title>
</head>
<body>
<p>hello world</p>
</body>
</html>
If we were to copy/paste this in a text editor, save it as a .html document, and put it on a web server, we would have built a website titled “My first webpage” and displaying the text “hello world”. It’s that simple.
As its name suggests, HTML is a markup language (like XML or Markdown, among others), meaning it uses tags to indicate the relationships between each element inside the document.
Each tag has its own meaning.
An HTML document starts with to indicate to automated readers that it’s an HTML document.
We then find the tag that will wrap the whole document.
The tag contains metadata (data about the data contained within the document—in this case, the title).
The content of the document is placed in the tag. In our example, we have a paragraph tag
displaying the text “hello world”.
Tags are the building blocks we use to create rich webpages. In the next article of this series, we will see more tags, how to use them, and how they concretely translate into a web interface.