Basic HTML Notes with Examples
1. Introduction to HTML
HTML (HyperText Markup Language) is the standard language for creating webpages and
web applications. It uses a system of tags to structure content like text, images, links, and
more.
2. Basic HTML Document Structure
Here is a basic HTML structure:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a paragraph.</p>
</body>
</html>
3. Common HTML Tags and Their Usage
3.1 Headings
HTML provides six levels of headings, from <h1> to <h6>:
<h1>This is a Heading 1</h1>
<h2>This is a Heading 2</h2>
...
<h6>This is a Heading 6</h6>
3.2 Paragraphs
Use the <p> tag to define paragraphs:
<p>This is a paragraph.</p>
3.4 Images
Use the <img> tag to display images:
<img src="[Link]" alt="Description" width="300" height="200">
3.5 Lists
HTML supports ordered and unordered lists:
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<ol>
<li>First</li>
<li>Second</li>
</ol>
3.6 Tables
Tables organize data in rows and columns:
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Alice</td>
<td>24</td>
</tr>
</table>