Namaste HTML Lec 2
Namaste HTML Lec 2
This note covers all fundamental HTML concepts we have learned so far, including headings,
paragraphs, formatting, lists, inputs, and links.
1 HTML Structure
1️⃣
Every HTML page follows this basic structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
</head>
<body>
</body>
</html>
<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Smaller Heading</h3>
Text Formatting:
<b>Bold</b>, <i>Italic</i>, <u>Underline</u>, <strong>Strong</strong>,
<em>Emphasized</em>, <small>Small text</small>, <mark>Highlighted</mark>
4️⃣Lists in HTML
📌 Unordered List (<ul>) - Uses bullet points.
<ul>
<li>Apple</li>
<li>Banana</li>
</ul>
<ol>
<li>Step 1</li>
<li>Step 2</li>
</ol>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name">
<label for="email">Email:</label>
<input type="email" id="email" placeholder="Enter your email">
<label for="password">Password:</label>
<input type="password" id="password">
✅ id vs name:
<a href="https://www.google.com">
<img src="google-logo.png" alt="Google">
</a>
<h1>Welcome to My Webpage</h1>
<h2>About Me</h2>
<p>Hello! My name is <b>John</b> and I love <i>coding</i>.</p>
<h2>Contact Me</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name">
<br><br>
<label for="email">Email:</label>
<input type="email" id="email" placeholder="Enter your email">
<br><br>
</body>
</html>
🎯 Summary
Feature Tag Example