NelsonLabs
HTML Fundamentals/What is HTML?

What is HTML?

HTML is the language that tells a browser what's on a page โ€” not how it looks, just what it IS. Every website in the world starts here.

ANALOGY

Think of a building. HTML is like the skeleton and floor plan of a building. It says: here's the entrance, here's a room, here's a window. CSS (which you'll learn next) is the paint, furniture, and lighting. HTML only defines structure โ€” CSS makes it beautiful.

What HTML actually is

HTML stands for HyperText Markup Language. It's not a programming language โ€” it doesn't do logic or calculations. It's a markup language: a way of annotating text to describe what each piece of content IS. A heading, a paragraph, an image, a link.

You write HTML in plain text files with a .html extension. When you open that file in a browser, the browser reads your markup and renders it as a visual page. That's it. No installation needed, no compilation, no servers โ€” just a text file and a browser.

Your first HTML
html
<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is a paragraph.</p>
  </body>
</html>

Tags, elements, and attributes

HTML is built from tags. A tag is a word wrapped in angle brackets: <h1>. Most tags come in pairs โ€” an opening tag and a closing tag. Everything between them is the element's content.

Anatomy of an HTML element
html
<!-- Opening tag   Content         Closing tag -->
   <h1>         This is a heading    </h1>

<!-- An attribute adds extra info to an element -->
<a href="https://nelsonlabs.dev">Visit NelsonLabs</a>
<!--  ^attribute name  ^attribute value               -->

TIP

Self-closing tags. Some elements don't wrap content โ€” they stand alone. These are called void elements. <img>, <br>, and <input> are examples. They don't need a closing tag.