A typical HTML page has the following structure: a declaration,root element,section for metadata, andsection for content.
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to Learn2Kode</h1>
<p>This is my first HTML page!</p>
</body>
</html>
Welcome to Learn2Kode
This is my first HTML page!
Every HTML document has a standard outline:
<!DOCTYPE html> – defines HTML version
<html> – root element
<head> – metadata, title, links to CSS/JS
<body> – visible content
<!DOCTYPE html>
<html>
<head>
<title>Document Outline Example</title>
</head>
<body>
<h1>HTML Outline</h1>
<p>This is the body content</p>
</body>
</html>
HTML Outline
This is the body content
Practice writing small HTML pages daily
Always validate your HTML using W3C Validator
Learn the most common tags first: headings, paragraphs, links, images, lists
Use your try-it editor to test code instantly