If you are asking which tag does an HTML page start with, the most accurate answer is this: in modern HTML, a document usually begins with the declaration <!DOCTYPE html>. Strictly speaking, this is not a tag in the usual sense, but a document instruction that tells the browser the page uses the HTML5 standard.
What comes first in an HTML document
The first line in a file is typically <!DOCTYPE html>. After that comes the root tag <html>, which contains the <head> and <body> sections. This order is considered the correct structure for most modern web pages.
Simple structure example:
- <!DOCTYPE html> — document type declaration
- <html> — start of the HTML structure
- <head> — metadata, styles, script links
- <body> — visible page content
Why the doctype matters
Without <!DOCTYPE html>, a browser may switch to so-called compatibility mode. In that mode, it tries to render the page as if it were an older document, which can lead to odd spacing, styling issues, or unpredictable layout behavior.
In HTML5, the declaration is short and easy to remember. It does not include complicated parameters, but it serves an important technical purpose: it tells the browser to use modern rendering rules.
A common point of confusion: tag or declaration
The question of which tag does an HTML page start with often appears because learning materials loosely call everything a “tag.” In reality, the start of the document is not a tag at all, but a doctype declaration. The first actual tag in the file is <html>.
Easy way to remember it:
- first line: <!DOCTYPE html>
- first tag: <html>
What a basic page skeleton looks like
Here is the minimum correct template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
</head>
<body>
Page content
</body>
</html>
This structure is suitable for learning, simple websites, and most basic projects. It helps establish the correct document structure from the start and reduces the chance of errors.
What to remember
If you need a short answer to which tag does an HTML page start with, say this: the page begins with <!DOCTYPE html>, and after that comes the <html> tag. Together, they form the standard foundation of a modern HTML document.

