Standalone content
Interactive Media // HyperText Markup Language // 2026
REF: HTML_001
HTML is a structure language. Think of it as nested boxes: a page contains sections, sections contain headings and paragraphs, and each part is wrapped in tags.
<main>
<section>
<h1>Title</h1>
<p>This paragraph is inside the section.</p>
</section>
</main>
Some elements do not wrap content, so they do not need a closing pair. Common examples are <img>, <br>, <hr>, and <meta>.
<img src="poster.jpg" alt="Film poster"> <br> <hr>
<!-- inline -->
<p style="color: blue;">Inline style example</p>
<!-- in <head> -->
<style>
p { color: blue; }
</style>
<!-- external -->
<link rel="stylesheet" href="styles.css">
Every HTML document begins with a DOCTYPE and basic structure. This tells the browser what kind of document to expect.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Page Title</title> </head> <body> <!-- Content goes here --> </body> </html>
Use semantic elements to give meaning to your document structure, with a live preview for each:
Related content grouped together.
Standalone content
<h1>Main Heading</h1> <h2>Subheading</h2> <h3>Smaller Heading</h3> <!-- h4, h5, h6 available -->
<p>Regular paragraph text.</p> <strong>Bold important text</strong> <em>Italic emphasized text</em> <mark>Highlighted text</mark>
Regular paragraph. Important, Emphasis, and Highlight.
<ul> <li>Item one</li> <li>Item two</li> <li>Item three</li> </ul>
<ol> <li>First step</li> <li>Second step</li> <li>Third step</li> </ol>
<a href="https://example.com">Click here</a> <a href="page.html">Internal link</a> <a href="#section-id">Jump to section</a>
<img src="image.jpg" alt="Description"> <img src="image.webp" alt="Description" width="300" height="200">
<!-- Video --> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> </video> <!-- Audio --> <audio controls> <source src="audio.mp3" type="audio/mpeg"> </audio>
<form action="/submit" method="POST"> <label for="name">Name:</label> <input type="text" id="name" name="name"> <label for="email">Email:</label> <input type="email" id="email" name="email"> <button type="submit">Submit</button> </form>
<canvas id="myCanvas" width="400" height="300"></canvas>
<script>
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
ctx.fillRect(10, 10, 100, 100);
</script>
<svg width="100" height="100"> <circle cx="50" cy="50" r="40" fill="blue"></circle> <rect x="10" y="10" width="50" height="50" fill="red"></rect> </svg>