Loading Page Content...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Preparing courses, live labs, and learning resources.सामग्री लोड हो रही है, कृपया प्रतीक्षा करें...
Whenever you write a Leave Application in school, it follows a standard, fixed format:
If you change the order or mix these sections, the application will not look right. In the exact same way, every HTML webpage has a standard fixed skeleton. In web development, we call this the HTML Boilerplate.
Whenever you create a new HTML file, you start with this essential structure:
Let us understand what each line does in simple, clear terms!
<!DOCTYPE html><html lang="en">lang="en" is an attribute that tells search engines (like Google) and browsers that the content of this page is in the English language.</html>.<head> Tag (The "Brain" of the Page - Invisible Section)<head> tag holds settings and instructions that are not directly visible on the screen, but are extremely important for the browser and Google search.<head> controls page settings.Inside <head>, we normally have three main tags:
<meta charset="UTF-8">:0 and 1).UTF-8 is a universal character system that accurately displays all letters from every language (English, Hindi, etc.), math symbols, currency signs (like ₹, $), and emojis (🔥, 🚀, ❤️).????).<meta name="viewport" content="width=device-width, initial-scale=1.0">:width=device-width: Tells the browser to adjust the page width to fit the physical screen size of any device (smartphones, tablets, or laptops).initial-scale=1.0: Sets the normal zoom level to 100% when the page first loads.<title>My First Webpage</title>:<body> Tag (The "Body" of the Page - Visible Section)<body> and </body>!<h1>Welcome to MSK Institute!</h1> ➡️ Displays a large, bold heading.<p>I am learning HTML5.</p> ➡️ Displays regular paragraph text.<body>. If it is a setting or configuration for the browser, write it inside <head>.<head> and <body>| Feature | <head> Tag | <body> Tag |
|---|---|---|
| Is it visible on screen? | No (Invisible) | Yes (Visible) |
| What do you put inside? | Page title, metadata, mobile settings | Headings, paragraphs, photos, videos, links |
| Who is it for? | For the browser and search engines (Google) | For visitors and users reading your website |
| Real-Life Analogy | Human Brain & Memory | Human Face, Hands & Body |
<head>:<p> or <h1> inside <head>, it is bad coding practice and can break your website's layout. Always put visible content inside <body>.<!DOCTYPE html>:</body> and </html> at the bottom of your file.<!DOCTYPE html> tells the browser this file uses modern HTML5.<html> is the root container of the whole webpage.<head> contains invisible settings, UTF-8 encoding, and the <title>.<body> contains all visible elements (headings, text, images).<meta name="viewport"> ensures the website looks great on mobile phones.Test your understanding with these questions:
<!DOCTYPE html>?<meta charset="UTF-8"> inside <head>?<title> tag placed inside <head> instead of <body>?about-me.html.<title> to: About Me | Class 10.<body>, add:<h1> heading with your name.<p> paragraph describing your two favorite school subjects or hobbies.In the next lesson, we will continue your web development journey with VS-Code Setup (Introduction).
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
| Previous Lesson | Next Lesson |
|---|---|
| Introduction to HTML | VS-Code Setup |
Test your understanding of this lesson with 5 questions. Each question has one correct answer.