HTML Cheat Sheet
1. Basic Structure
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
2. Text Formatting Tags
<h1> to <h6>, <p>, <br>, <hr>, <strong>, <em>, <u>, <pre>, <small>, <mark>, <del>, <sup>, <sub>
3. Links and Images
<a href="url">link text</a>
<img src="image.jpg" alt="description" width="300">
4. Lists
<ol><li>Item</li></ol>, <ul><li>Item</li></ul>, <dl><dt>Term</dt><dd>Definition</dd></dl>
5. Tables
<table><tr><th>Head</th></tr><tr><td>Data</td></tr></table>
6. Forms
<form><input type="text"><input type="submit"></form>
Other: <textarea>, <select>, <option>, <label>
7. Semantic Tags
<header>, <footer>, <main>, <section>, <article>, <aside>, <nav>
8. Media Tags
<video src="video.mp4" controls>, <audio src="audio.mp3" controls>, <iframe src="url">
9. Head & Meta
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
10. Best Practices
Use semantic tags, alt for images, proper indentation, lowercase tags, close all tags