SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 26 of 30

HTML Head

2 min read · Free · No login needed

The <head> element holds information about the page. Nothing inside the head is shown on the page itself — but without it, the page would not work properly in browsers or in Google search.

What goes in the head

  • <title> — the browser-tab text and the Google search headline.
  • <meta charset="UTF-8"> — the character encoding. UTF-8 covers every language, including Hindi. Always include it, first thing in the head.
  • <meta name="viewport" content="width=device-width, initial-scale=1.0"> — makes the page fit phone screens. Without it, mobile browsers show a tiny zoomed-out desktop page.
  • <meta name="description"> — a short summary Google may show under your page in search results.
  • <link rel="stylesheet" href="styles.css"> — connects the CSS file.
  • <link rel="icon" href="favicon.png"> — the favicon.
  • <script> — JavaScript that must load before the page (most scripts belong at the end of the body instead).

The viewport tag, in plain words

Phones have narrow screens. The viewport tag tells the phone: "this page is designed to be responsive — show it at the device's real width". Every modern page needs it. If you ever open a site on your phone and it looks tiny and zoomed out, that site is missing this one line.

Tip: The meta description should be one or two sentences, under about 160 characters, and should say what the visitor will find on the page — it is your free advertisement in Google.

Example

Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn HTML from scratch with free lessons, examples and a certificate.">
<title>HTML Head — KAMALDNP Seekho</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<h1>Page content goes here</h1>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Head
Try it yourself: copy the code above into a file named 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.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

AI Prompt Engineering Webinar 2026
View
Core Python Programming – 3 Month Complete Course
₹700
View
Full Stack PHP Development Course 2026
₹3,000
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →