DEV Community

Cover image for Understanding the Language Behind Every Webpage - What HTML Is and Why It Exists
Theo
Theo

Posted on

Understanding the Language Behind Every Webpage - What HTML Is and Why It Exists

When you write an essay in a word processor, you’re essentially filling a blank document with content. That content might be text, a picture, a heading, or a link to something else. A webpage works almost the same way. The difference is that instead of dropping content into Word or Google Docs, you express that content in a code editor using HTML. If you'd like a more formal definition, MDN has a helpful overview of what HTML is.

HTML, short for HyperText Markup Language, is the language that gives structure to information on the web. It tells the browser what your content is supposed to be. A piece of content can be declared as a paragraph, an image, a heading, a list, a link, and more. If you're curious about the full collection of available tags, MDN maintains a clear and complete HTML element reference.

A useful way to think about this is to imagine building a small house. The bricks aren’t decorated yet, but they define the rooms and the shape. HTML works the same way. It gives your webpage the foundation and layout before any styling or behavior comes into play.

HTML does this using tags. A tag is a small instruction that wraps around content and labels it. A paragraph uses the <p> tag, an image uses the <img> tag, and links use the <a> tag. Put a few of these tags together, and the browser knows how to interpret the document you’re working on.

VS Code’s HTML boilerplate (the minimum amount of code required for a valid HTML document) looks like this:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
Enter fullscreen mode Exit fullscreen mode

Some of the content above goes deeper than what you need right now, but it shows the main idea clearly: content placed inside structure.

If you’re new to web development or revisiting the fundamentals, it helps to keep this perspective in mind. HTML is not a programming language and it doesn’t try to be one. Its job is organization. Once you understand the role it plays in the larger web stack, everything else becomes easier to learn.

This article sets the stage. In the next part of the series, we’ll look more closely at how HTML documents are structured.

Top comments (0)