1 min read · Free · No login needed
Every HTML page follows the same basic structure. Once you learn it, you can read any web page's code and understand where things belong.
<!DOCTYPE html> — the first line. It tells the browser: this is an HTML5 document. It is not a tag; it is a declaration.<html> — the root element. Everything on the page sits inside it.<head> — information about the page: the title, the character set, links to CSS. Nothing inside the head is shown on the page itself.<title> — the text that appears on the browser tab. It sits inside the head.<body> — everything the visitor actually sees: headings, text, images, links, buttons.Most tags come in pairs: an opening tag like <h1> and a closing tag like </h1>. The content sits between them. A few tags, like <br> and <img>, have no closing tag — they are called empty elements.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testFree tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Download karne ke liye login karo. Login ke baad yahi page pe rahoge!
Naya ho? Register karo →