What is HTML source, anyway?
Updated 2026-10-22T00:00:00.000Z
Quick answer
HTML source is the text a website sends to your browser. The browser turns it into the page you see. Viewing it shows how the page is built.
Every web page is a text file written in HTML. When you open a page, your browser downloads that text and turns it into headings, images and buttons. The text itself is the source.
The parts you’ll see
<!DOCTYPE html>
<html lang="en">
<head>
<title>Shown in the browser tab</title>
<meta name="description" content="Shown in search results">
</head>
<body>
<h1>The main heading</h1>
<p>A paragraph of text.</p>
</body>
</html>
- Tags like
<p>and</p>mark where something starts and ends. - Attributes like
lang="en"give a tag extra information. - The head holds information about the page: the title, the description, links to styles and scripts.
- The body holds what you see.
- Comments like
<!-- note -->are notes for developers. Browsers ignore them.
Why look at it?
- To check what search engines see: the title, description and canonical link.
- To learn how a site is built, or which tools it uses.
- To find an image or file address.
- To fix your own site.
Try it on any page: paste an address on viewhtmlonline.com.
Questions people ask
Is it legal to view a page’s source?
Yes. Every browser downloads the source to show the page. Viewing it is normal. Copying someone’s work is a different question.
Can viewing source harm my device?
Not on viewhtmlonline. We show the code as text, so nothing from the page runs.