Software & Web Engineering

What Is HTML? The Language Behind Every Web Page

Bản phác thảo khung trang web trên bảng ghim trong studio sáng
In this article

    You open the same website on your phone in the morning and on your computer in the evening. The words are the same words. The images sit in the same places. The button is still in the top right corner. Nobody rearranges every word each time you switch devices. What arranges it all is a plain text file that the browser reads and turns into a page. That file is written in HTML. The question “what is HTML” has a shorter answer than you might expect: HTML is a markup language that tells the browser what each piece of content is.

    This article explains what HTML does and how the browser reads it. It also shows why the way you write HTML decides whether Google can understand your page. Screen readers depend on the same writing. You do not need to install anything. The hands-on part at the end only needs the browser you are already using.

    Quick summary

    • HTML (HyperText Markup Language) is a markup language: it tells the browser what each piece of content is, from headings and paragraphs to links and images.
    • HTML decides the structure and meaning of a page. CSS handles how it looks, JavaScript handles how it behaves when you interact with it.
    • Writing HTML with the right tags, called semantic HTML, helps screen readers read the page and helps search engines understand the content so they can cite it.
    A sketched website wireframe on a corkboard in a bright studio
    A sketched website wireframe on a corkboard in a bright studio

    What is HTML?

    To answer “what is HTML”, start with the name itself. HTML stands for HyperText Markup Language. According to MDN, HTML is the most basic building block of the web. It defines the meaning and structure of web content. CSS handles how it looks, JavaScript handles how it behaves.

    What the name of HTML tells you

    The name has two parts, and each part describes one job.

    HyperText is text that contains links. A word or an image on a page can be clicked to go to another page. The destination can be on the same website or on a completely different one. Without links, each page would be a document standing on its own.

    Markup is how HTML works. You do not order the computer to calculate anything. You label each piece of content with tags. The method is like highlighting sections of a printed page and writing notes in the margin. This is a heading, that is a paragraph, this is a link, that is an image. The browser reads those labels and displays the page accordingly.

    Why HTML is not a programming language

    That is why HTML is not a programming language. HTML has no variables, loops, or conditions, so it cannot process logic on its own. It describes, it does not command. A page written in HTML alone does not calculate or store data. Those jobs belong to JavaScript and to software on the server.

    Take a small example. The words “How to build a website” sitting bare in a file show up in the browser as one ordinary line of text. Wrap them in an <h1> tag and the browser understands this is the main heading of the page. It displays the heading larger and remembers its role. All of HTML works on that principle: same content, different label.

    What does an HTML document contain?

    An HTML document is a plain text file, usually with the .html extension. Look at one complete page to see what is HTML in practice. Below is the shortest page that still follows the standard.

    <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>My first page</title>
      </head>
      <body>
        <h1>Hello</h1>
        <p>This is my first paragraph.</p>
        <a href="https://gnurtlab.com/en/">Go to the GnurtLab home page</a>
      </body>
    </html>

    Each part of this code has its own job.

    The line <!doctype html> comes first. It tells the browser this is a modern HTML document, so it renders it to the current standard. The <html> tag wraps the whole page and is called the root element. The lang="en" attribute says the main content is written in English.

    The <head> tag holds things that do not show up on screen. The browser and search engines still need to know them. <title> is the title shown on the browser tab. <meta charset="utf-8"> declares the character encoding so text displays correctly. The <body> tag holds everything readers see. That is the heading <h1>, the paragraph <p>, and the link <a>.

    Three small rules help you read any HTML code. First, most tags come in pairs. There is an opening tag such as <p>, the content, then a closing tag such as </p>. Second, a tag can carry attributes that add information. The href in an <a> tag holds the link address. The src in an <img> tag holds the image path. The alt holds a text description of the image. Third, some tags have no content and need no closing tag. An example is <img>, and these are called empty elements. Tag names are written in lowercase by common convention.

    What does the browser do with HTML?

    When you type an address and press Enter, the server sends back an HTML file in plain text. The browser reads that file from top to bottom. It understands the role of each piece of content from its tags. Then it builds a tree structure in memory called the DOM. Then the browser applies CSS to add color and layout. It runs JavaScript if there is any, and only then draws the page on screen.

    The tags never appear on screen. You never see the words <h1> or </p> while reading an article. The browser hides all the tags and only shows the content inside them, according to the role each label assigns. That is why the same HTML file can look different on a phone and on a computer. The browser reads the same structure and redraws it to fit the screen.

    You can check this right now on the page you are reading. Open any website and press Ctrl+U on Windows or Linux, or Cmd+Option+U on a Mac. A new tab opens with the full source code of the page. It is the same kind of code as in the example above, only much longer. You can also type view-source: right before the page address. Do not be put off by the length. A modern page also contains CSS and JavaScript, so its source runs to thousands of lines. Just find the first <h1> tag. It is usually the main heading of the page. Then look for a few <p> tags around it.

    How do HTML, CSS, and JavaScript divide the work?

    These three technologies go together on almost every web page. Each one handles one job, and none of them can replace the others.

    TechnologyHandlesExample: a “Buy now” button
    HTMLWhat the content isThis is a button, and its label reads “Buy now”
    CSSWhat the content looks likeThe button is blue, the text is white, it sits on the right
    JavaScriptHow the content reactsClicking the button adds one item to the cart

    Without HTML, CSS and JavaScript have nothing to attach to. CSS needs to know which part is the button before it can color it. JavaScript needs to know which part is the button before it can give it a click behavior. The other way around, HTML alone still produces a working page. It only looks plain and does not react when you click. The article What Is JavaScript explains the behavior part in detail. It shows how JavaScript makes a page respond to what you do.

    Diagram of the three layers of a web page: HTML, CSS, and JavaScript
    Diagram of the three layers of a web page: HTML, CSS, and JavaScript

    Semantic HTML: the same page, written two ways

    HTML lets you write a page that looks identical in two different ways. The first way uses tags that state each role. These are <header>, <nav>, <main>, <article>, <footer>, and <button>. The second way uses the generic <div> tag for everything. It paints over the page with CSS until it looks the same. The human eye cannot tell them apart. But the browser, screen readers, and search engines can.

    How semantic HTML helps screen readers

    Take a “Play video” button as an example. Written as <div>Play video</div> and styled with CSS to look like a button, it still looks like a button. But the keyboard cannot press it with the Tab key. A screen reader does not know it is a button. Written as <button>Play video</button>, it can be pressed from the keyboard right away, with no extra code. MDN puts it plainly: using the right element for the job gives you many features for free. Using the wrong element and patching it later costs work and still leaves gaps.

    How semantic HTML helps search engines understand a page

    The second benefit is on the search side. According to MDN, search engines give more weight to keywords inside headings and links. Keywords inside a meaningless <div> get less weight. A page written with the right tags is easier to find. This matters even more now that AI answers quote page content directly instead of only listing links. A page whose headings and sections are clearly labeled is easier for a machine to understand. It is also easier to cite than a page where everything is a <div>. The article What Is SEO and GEO explains why being cited by AI is becoming part of running a website. The article AI Search: How Customers Choose a Provider describes how customers meet you through an AI answer.

    Once you know what is HTML, you do not need to get every tag right from the start. Each place you fix one tag is already an improvement. Start with the three easiest. The main heading of the page is an <h1>. Section headings are <h2> and <h3> in order. A clickable button is a <button>.

    How has HTML changed over more than 30 years?

    HTML was born together with the web. At the end of 1990, Tim Berners-Lee wrote the first web browser and the first web server. He was then working at CERN. At the end of 1991, he published the first public description of HTML. It was a document called “HTML Tags” with only 18 elements. In November 1995, HTML 2.0 arrived as RFC 1866, the first formal specification. HTML 3.2 followed in January 1997, and HTML 4.0 in December 1997. On 28 October 2014, HTML5 became an official W3C Recommendation.

    Since 2019, the WHATWG and the W3C have agreed to maintain a single version. That version is the HTML Living Standard, updated continuously instead of released as numbered versions. So “HTML5” is only the familiar name for the current generation of the standard. It is not a version that will one day have an “HTML6” after it.

    Two things are worth remembering from this history. First, HTML was originally designed to describe scientific documents for researchers to share with each other. This is stated in the WHATWG standard itself. Only later did it become the platform for every kind of website and application. Second, backward compatibility is a core principle of the WHATWG. That is why pages written in the 1990s still open in a browser today.

    Three common misunderstandings

    “HTML is a programming language.” It is not. HTML has no variables, loops, or conditions, so it cannot process logic on its own. It describes content, it does not command the computer. Beginners often make this mistake because HTML looks like code. But looking like code and being a programming language are two different things.

    “Knowing HTML means you can build a beautiful website.” Not yet. HTML only builds structure and meaning. A beautiful page needs CSS, and a page that reacts when you click needs JavaScript. Learning HTML is a solid first step, not the last one.

    “HTML is outdated now that frameworks exist.” It is not. React, Vue, and WordPress all end up producing HTML for the browser to read. Frameworks change every few years, HTML stays. Understanding HTML helps you read what every framework produces. It also helps you fix the places where a framework does something you did not intend.

    Try it yourself in 5 minutes

    You do not need to install anything to write your first web page. Follow these four steps:

    1. Open Notepad on Windows or TextEdit on a Mac, paste the sample code from the section “What does an HTML document contain?”, and save it with the name index.html.
    2. Drag the saved file into a browser window. You will see your first page appear, with a heading, a paragraph, and a working link.
    3. Change the words inside the <h1> tag to something else, save the file, and reload the page. The heading changes right away, because the browser reads the file again on every load.
    4. Open the website you visit most, press Ctrl+U to view its source, find the first <h1> tag, and compare it with the heading you see on the page. You have just read real HTML, not an example from a book.

    If you want other people to see the page you just made, you need to put the file on a server. That is the job of hosting. The article What Is Web Hosting explains the types of hosting and how to choose one for a new website. A form on a page sends its data to the server through an API. A newsletter signup box is one example. The article What Is an API explains how the browser and the server talk to each other.

    Frequently asked questions

    Is HTML a programming language?

    No. HTML is a markup language: it labels content so the browser knows what each part is. HTML has no variables, loops, or conditions, so it cannot process logic on its own. A page that needs to calculate or react to clicks needs JavaScript.

    How long does it take to learn HTML well enough to build a simple page?

    You can write a simple page as soon as you know a few basic tags from this article. Those are headings, paragraphs, links, images, and lists. Building a page that looks good and reacts to clicks takes CSS and JavaScript as well. Each one is a separate stage of learning.

    What is the difference between HTML and HTML5?

    HTML5 is the familiar name for the current generation of the standard, recognized by the W3C on 28 October 2014. The official standard today is the HTML Living Standard, maintained by the WHATWG and updated continuously. Saying “learn HTML5” and “learn HTML” means the same thing today.

    Do I need to learn HTML before using WordPress?

    Not necessarily. WordPress handles most of page creation and publishing, and you can run a website without touching any code. But knowing HTML helps you fix the places where the editor does something you did not intend.

    Read the source of the page you visit most

    Now you know what is HTML. It is not hard. It only looks strange at first because you have never seen the back of a web page. The front is what you read every day. The back is a few hundred tags telling the browser what each part is. Once you understand the back, other things become easier. You will see why a page looks wrong on a phone. You will also see why Google quotes one passage and not another.

    What comes next depends on what you want to do. If you want to learn to build websites, learn CSS right after HTML. Then read What Is JavaScript to understand the behavior part. If you want to hire someone to build a website, you now have enough to ask the right questions. Does my page use heading tags correctly? Can its buttons be pressed from the keyboard? Is the page structure clear enough for Google to understand?


    Sources

    1. MDN Web Docs, “HTML: HyperText Markup Language”, https://developer.mozilla.org/en-US/docs/Web/HTML, accessed 04/12/2026
    2. MDN Web Docs, “HTML: Creating the content”, https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Creating_the_content, accessed 04/12/2026
    3. MDN Web Docs, “HTML: A good basis for accessibility”, https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Accessibility/HTML, accessed 04/12/2026
    4. WHATWG, “HTML Standard, 1 Introduction”, https://html.spec.whatwg.org/multipage/introduction.html, accessed 04/12/2026
    5. Wikipedia (Vietnamese), “HTML”, https://vi.m.wikipedia.org/wiki/HTML, accessed 04/12/2026

    WordPress is also where the HTML you just read about comes to life: What is WordPress? shows how a WordPress site produces HTML pages and what such a website really costs.

    Assistant Gnurt

    Full-stack developer

    Discuss your project

    Comments

    No comments yet. Be the first!