Tag
<p> </p>
A keyword in angle brackets. Most come in pairs: an opening tag <p> and a closing tag </p> with a slash.
Free Lesson
HTML (HyperText Markup Language) is the code that gives every web page its structure. It uses short tags like <h1> and <p> to tell the browser which text is a heading, a paragraph, a link or an image.
Tim Berners-Lee created HTML in 1991 for the first website, and every page you visit today is still built on it. Edit a real page below and watch it change.
Interactive demo
Change the text, add a tag or edit an attribute. The preview updates as you type. Scripts are switched off and nothing leaves your browser.
Browser preview
The basics
<p> </p>
A keyword in angle brackets. Most come in pairs: an opening tag <p> and a closing tag </p> with a slash.
<p>Hello</p>
The opening tag, the content and the closing tag together. This whole thing is one paragraph element.
<a href="https://example.com">
Extra information inside the opening tag, written as name="value". Here href tells the link where to go.
Anatomy
<!DOCTYPE html>Doctype: Tells the browser this is a modern HTML5 page.
<html lang="en">html element: Wraps the whole page. lang says which language it is written in.
<head> ... </head>head: Information about the page: the tab title, description and links to CSS. Not shown on the page itself.
<title>My page</title>title: The text in the browser tab and the blue link in Google results.
<body> ... </body>body: Everything visitors actually see: headings, paragraphs, images, links and buttons.
Step by step
Open any text editor (Notepad, TextEdit in plain-text mode, or VS Code) and save an empty file as index.html.
index.htmlType the doctype, then html, head and body tags. This structure is the same on every web page.
<!DOCTYPE html>
<html lang="en">
<head></head>
<body></body>
</html>Inside head, add a title element. It shows in the browser tab.
<head>
<title>My first page</title>
</head>Inside body, add a heading and a paragraph. Close every tag you open.
<body>
<h1>Hello, world!</h1>
<p>I made this page myself.</p>
</body>Save the file and double-click it. Your browser opens it as a real web page. Edit, save and refresh to see changes.
File > Open > index.htmlHonest answer
Yes, it is the easiest place to start. HTML has no logic to get wrong, only tags that label content, so you can build a working page in an afternoon. About 20 tags cover most pages. The harder parts come later with CSS layout and JavaScript, which build on the HTML you already know.
Six questions on what HTML is and how it works.
Code Card turns your Claude Code, Codex, and OpenClaw sessions into a public developer profile with activity graphs, streaks, badges, and a shareable card. Start with npx code-card.
FAQ
HTML (HyperText Markup Language) is the code that gives every web page its structure. It uses tags like <h1> and <p> to tell the browser which text is a heading, a paragraph, a link or an image.
Yes. HTML is one of the easiest things to learn in tech because it has no logic, only tags. Most beginners can build a simple page in an afternoon and learn the common tags in a week or two.
HTML is used to structure websites and web apps, write blog posts and documentation, format emails, help search engines and screen readers understand a page, and embed images, video, forms and maps.
Every website still uses HTML. Frameworks like React and site builders like WordPress generate HTML behind the scenes, because HTML is the only page format every browser reads.
HTML decides what is on the page and what each part means. CSS decides how it looks: colors, fonts, spacing and layout. Most pages use both, plus JavaScript for interactivity.