Getting everything ready for you…

Loading courses, problems and your progress. This takes just a moment.

0s

HTML Cheat Sheet

Page skeleton

// Starter template
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Page</title></head>
<body></body>
</html>

Text

<h1>Title</h1> <h2>Subtitle</h2> <p>Paragraph</p>
<strong>bold</strong> <em>italic</em> <mark>highlight</mark> <br /> <hr />
<code>inline code</code> <pre>preformatted</pre> <blockquote>quote</blockquote>

Links and media

<a href="https://site.com" target="_blank" rel="noopener noreferrer">Link</a>
<a href="#id">Jump</a> <a href="mailto:a@b.com">Email</a>
<img src="a.png" alt="description" loading="lazy" />
<video src="v.mp4" controls></video> <audio src="a.mp3" controls></audio>

Lists and tables

<ul><li>Item</li></ul> <ol><li>Step</li></ol>
<table><thead><tr><th>H</th></tr></thead><tbody><tr><td>D</td></tr></tbody></table>

Forms

<form action="/submit" method="post"></form>
<label for="e">Email</label> <input id="e" name="email" type="email" required />
<input type="password" minlength="8" /> <input type="number" min="0" max="10" />
<input type="checkbox" checked /> <input type="radio" name="g" value="a" />
<select name="s"><option value="1">One</option></select> <textarea rows="4"></textarea>
<button type="submit">Send</button>

Semantic layout

<header></header> <nav></nav> <main></main>
<article></article> <section></section> <aside></aside> <footer></footer>
<figure><img src="x.png" alt="" /><figcaption>Caption</figcaption></figure>

Head and SEO

<meta name="description" content="Page summary" />
<link rel="canonical" href="https://site.com/page" />
<meta property="og:image" content="https://site.com/og.png" />
<link rel="stylesheet" href="style.css" /> <script src="app.js" defer></script>

Full HTML documentation