HTML (HyperText Markup Language) is the standard markup language for describing the structure and content of web pages. A browser reads an HTML file, builds a document tree from its elements, and renders headings, paragraphs, links, images and forms from it.
HTML does not style or program a page. It gives content meaning: CSS controls how it looks, and JavaScript controls how it behaves. HTML is maintained as the HTML Living Standard by WHATWG, so there are no numbered versions to learn beyond "modern HTML".
The name has two parts.
Writing <p>Hello</p> is markup: the tags say that the text between them is a paragraph.
Every page follows the same skeleton. Save this as index.html and open it in a browser.
| Part | Purpose |
|---|---|
<!DOCTYPE html> | Tells the browser to use standards mode |
<html lang="en"> | Root element; lang helps screen readers and search engines |
<head> | Metadata that is not shown on the page |
<meta charset="utf-8"> | Character encoding; keep it in the first 1024 bytes |
<meta name="viewport"> | Makes the page scale properly on phones |
<title> | Text for the browser tab and search results |
<body> | Everything the visitor sees |
An element is usually an opening tag, content and a closing tag. Attributes sit inside the opening tag and add information.
Here a is the element, href and title are attributes, and the text is the content. Some elements are void and have no content or closing tag, for example <img>, <br> and <input>.
Create two files in the same folder, home.html and profile.html, and link them with the anchor element.
Each page is marked up on its own, and the <a> elements are the hypertext that connects them. The href value is relative, so it works as long as both files stay in the same folder.
A browser on Windows, macOS, Linux, Android or iOS reads the same HTML text and renders it with its own engine. The page does not contain machine code for one operating system, so the same file works on any device with a standards-compliant browser. Differences are mostly in fonts, form controls and newer features, which is why you should test in more than one browser.
Use semantic elements such as <header>, <nav>, <main>, <article> and <footer> rather than many generic <div> elements. They improve accessibility and give search engines a clearer picture of the page.
<!DOCTYPE html> and set lang on <html>.<h1> per page and keep heading levels in order.alt attribute; use alt="" for purely decorative images.<center>, <font> and <marquee>; use CSS.<div> elements; use <a> or <button>.No. HTML is a markup language that describes structure. It has no logic such as loops or conditions, which come from JavaScript.
HTML is a living standard maintained by WHATWG and updated continuously. Older numbered versions such as HTML 4 and HTML5 are historical names.
A text editor and a browser. Save a file with the .html extension and open it in the browser.
HTML provides structure and content, CSS provides presentation, and JavaScript provides behaviour. Most pages use all three.
HTML is the markup language that structures every web page. Learn the basic skeleton, elements and attributes, links between pages, and semantic elements, then add CSS for style and JavaScript for interaction.