HTML Handwritten-style Notes
1. What is HTML?
HTML stands for HyperText Markup Language.
It is used to create webpages and structure content.
HTML uses 'tags' to define elements.
Example:
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome!</h1>
</body>
</html>
2. HTML Elements and Syntax
An element consists of a start tag, content, and end tag.
Example:
<p>This is a paragraph.</p>
Tags can also be self-closing like <br> or <img>.
Attributes add extra info to tags:
<img src="[Link]" width="200">
3. Important HTML Tags
Headings: <h1> to <h6>
Line Break: <br>
Comment: <!-- This is a comment -->
HTML Handwritten-style Notes
Formatting: <b>, <i>, <u>, <mark>, <strong>, <em>
Text alignment: CSS is preferred, but old tag: <div align="center">
Font size/color (old method): <font size="4" color="blue">Text</font>
4. HTML Tables
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Alice</td>
<td>22</td>
</tr>
</table>
<tr> = table row
<th> = table heading
<td> = table data
5. HTML Lists
Ordered List (numbered):
<ol>
<li>First</li>
<li>Second</li>
</ol>
Unordered List (bullets):
<ul>
<li>Apple</li>
<li>Banana</li>
HTML Handwritten-style Notes
</ul>
6. HTML Forms
Used to collect user data.
<form action="[Link]" method="post">
Name: <input type="text" name="name"><br>
Gender:
<input type="radio" name="gender" value="M"> Male
<input type="radio" name="gender" value="F"> Female<br>
<input type="submit" value="Submit">
</form>
Input types: text, password, radio, checkbox, submit, reset, email, etc.
<select> for dropdowns, <textarea> for multi-line text.