<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>This declares the document type and version of HTML. It must be the first line in your HTML document.
<!DOCTYPE html> — Recommended for modern websites.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">Why needed? Helps browsers render the page correctly and use proper rendering modes (standards mode).
<html lang="en">This is the root element of your HTML document.
lang="en" means English language is used.lang="fr" → Frenchlang="hi" → Hindilang="zh" → Chineselang="ar" → ArabicWhy important? Helps screen readers and search engines understand the content's language.
<meta charset="UTF-8">Defines the character encoding of your document (how characters are stored and read).
UTF-8: Most popular. Supports almost every language and emoji. Recommended.ISO-8859-1: Western European languages only (outdated).UTF-16: Less common, used internally in some systems.Tip: Always use UTF-8 for web compatibility and multi-language support.
<meta name="viewport" content="width=device-width, initial-scale=1.0">This makes the webpage responsive and mobile-friendly.
width=device-width: Sets the width of the page to the screen’s width.initial-scale=1.0: Sets the default zoom level.maximum-scale=2.0: Limits zoominguser-scalable=no: Prevents pinch zooming (not recommended for accessibility)<title>Document</title>Specifies the title of the page that appears in the browser tab and when bookmarked.
<title>Welcome to ZN Infotech</title>SEO Tip: Keep title relevant and under 60 characters.
<body> ... </body>This contains all the visible content of the webpage: headings, paragraphs, images, buttons, etc.
<body>
<h1>Hello World!</h1>
<p>This is a sample webpage.</p>
</body>
Tip: Keep body content semantic using proper HTML tags like <section>, <nav>, <article>, etc.
<!DOCTYPE html>: Declares HTML5 document.<html lang="en">: Root element with language set.<meta charset="UTF-8">: Character encoding.<meta name="viewport" ...>: Responsive behavior for mobile screens.<title>: Page title in browser tab.<body>: Visible content of the page.