What is HTML?
What HTML is, what it isn't, and the role it plays alongside CSS and JavaScript.
2 menit membaca
HTML (HyperText Markup Language) is the language browsers use to understand what's on a web page. It doesn't describe how things look or how they behave — it describes what things are: a heading, a paragraph, a list, a link, an image. That structure is what a browser turns into the page you see.
Every website you've ever visited is built on HTML at its core. CSS then styles that structure, and JavaScript adds behavior — but without HTML, there's no page for either of them to work with.
HTML is markup, not a programming language
HTML has no variables, no loops, no logic. It's a markup language: you wrap content in tags to say what it is.
<h1>Welcome to my site</h1>
<p>This is a paragraph of text.</p><h1> marks "Welcome to my site" as the main heading. <p> marks the second line as a paragraph. The browser knows how to display each one by default (headings are bold and large, paragraphs are plain text), and CSS can override that later.
Tags, elements, and attributes
A tag is the markup itself, like <p> or </p>. An element is the tag plus its content: <p>This is a paragraph.</p>. Most elements have an opening and closing tag wrapping the content, though a few — like <img> or <br> — are self-closing because they don't wrap anything.
Attributes add extra information to a tag, written inside the opening tag as name="value":
<a href="https://example.com">Visit example.com</a>Here, href is an attribute on the <a> (anchor/link) tag, telling the browser where the link should go.
Why HTML still matters
It's tempting to think of HTML as "the easy part" compared to JavaScript, but the structure you choose has real consequences:
- Accessibility — screen readers rely on correct HTML to describe a page to users who can't see it.
- SEO — search engines read your HTML to understand what a page is about.
- Maintainability — well-structured HTML is far easier to style and script than a pile of generic
<div>s.
The rest of this course builds up from a single HTML page to forms, tables, media, and the semantic and accessible markup that professional sites rely on.