TutsFx logo

HTML for Absolute Beginners

What is HTML?

2 min read Last updated 45 minutes ago

HTML stands for HyperText Markup Language. It is not a programming language — it is a markup language, which means it describes the structure and meaning of your content.

When you visit a website, your browser downloads an HTML document and renders it on screen. The browser reads tags like <h1>, <p> and <img> to know what each piece of content is.

The anatomy of a tag

Most tags come in pairs: an opening tag and a closing tag.

html
<p>This is a paragraph.</p>
  • <p> is the opening tag
  • </p> is the closing tag (notice the forward slash)
  • The text between them is the tag's content

Some tags are self-closing and do not wrap content:

html
<img src="photo.jpg" alt="A mountain at sunset">
<br>
!

Don't forget the closing tag

Forgetting a closing tag is the single most common HTML mistake. If your page looks broken, check that every opening tag has a matching closing tag.

A minimal document

Every HTML page starts with the same skeleton:

html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Page</title>
</head>
<body>
    <h1>Hello, world!</h1>
</body>
</html>
Part Purpose
<!DOCTYPE html> Tells the browser this is modern HTML5
<head> Metadata: title, charset, links to CSS
<body> The visible content of the page

Your first exercise

  1. Create a new file named index.html
  2. Copy the skeleton above into it
  3. Open the file in your browser

You should see "Hello, world!" displayed as a large heading. Congratulations — you just wrote your first web page.

Share:

We value your privacy

We use cookies to enhance your browsing experience, serve personalized ads, and analyze traffic. By clicking "Accept", you consent to our use of cookies. Read our Privacy Policy to learn more.