HTML (HyperText Markup Language) describes the structure and content of a web page — headings, paragraphs, links, images, forms. It doesn't style anything and it doesn't add behavior; that's CSS and JavaScript's job.
A Complete Minimal Page
<!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, CodingNow!</h1>
<p>This is a complete, valid HTML document.</p>
</body>
</html>
Browser output: a page with a large heading "Hello, CodingNow!" followed by a paragraph of text — nothing styled, just structured content in the browser's default appearance.
The Three Layers of a Web Page
| Layer | Job |
|---|---|
| HTML | Structure — what the content is (a heading, a list, a form) |
| CSS | Presentation — how it looks (colors, layout, fonts) |
| JavaScript | Behavior — how it responds (clicks, validation, dynamic updates) |
HTML should hold up on its own, unstyled and without JavaScript — that's a good test of whether your markup is actually structured correctly. See HTML and CSS and HTML and JavaScript.
What HTML Is Not
- Not a programming language — no loops, no logic, no variables. It's a markup language.
- Not responsible for how things look — a heading tag doesn't guarantee large, bold text; that's just the browser's default CSS for it.
Common Mistakes
- Trying to style content directly in HTML (e.g. a
<center>tag or a<font>tag) instead of using CSS — these are obsolete and shouldn't be used in new code - Treating HTML tags as purely visual (using
<h1>just because it's "big text") instead of based on what the content actually means — see Semantic HTML
Interview Relevance
Q: "Is HTML a programming language?" No — it's a markup language; it has no computational logic. Being able to explain why (declarative structure vs. imperative logic) is a stronger answer than a flat yes/no.
Practice Question
Write a complete, valid HTML document with a title of "About Me" and one heading and one paragraph introducing yourself.