Web development
Build a Complete HTML Document
Updated Oct 28, 2026
A basic HTML document declares its type, identifies the language and includes head and body elements. The head contains metadata such as character encoding and page title. Visible content belongs in t
What you’ll learn
Learn and practise build a complete html document.
Explanation
A basic HTML document declares its type, identifies the language and includes head and body elements. The head contains metadata such as character encoding and page title. Visible content belongs in the body. Save the file with an .html extension and open it in a browser.
ឯកសារ HTML មាន doctype, html, head និង body។ Head ផ្ទុកព័ត៌មានដូចជា encoding និង title; មាតិកាដែលមើលឃើញនៅក្នុង body។
Worked example
Example: <!doctype html><html lang="en"><head><meta charset="utf-8"><title>My page</title></head><body><h1>Hello!</h1></body></html>
Practice
- Where should the visible main heading go?
- Explain the same idea using your own example.
Answers and guidance
Show answers / បង្ហាញចម្លើយ
- Inside the body element.
- Answers vary. Check your explanation against the lesson.
Quick recap
A basic HTML document declares its type, identifies the language and includes head and body elements.