Snippets·Free
HTML and CSS snippets
8 HTML snippets (landmarks, Open Graph tags, picture, dialog, a table with headers) and 12 CSS ones (reset, grid layouts, clamp, dark mode variables, reduced motion, container queries).
Free to install.
If PocketCode is installed on your Android device, this opens the page in the app.
Preview
5 of 20
Page layout with landmarkslayout
Header, nav, main and footer for a page body
<header>
<nav aria-label="${1:Main}">
<a href="/">${2:Home}</a>
</nav>
</header>
<main>
$0
</main>
<footer>
<p>${3:Footer text}</p>
</footer>Social preview meta tagsogmeta
Description and Open Graph tags for link previews
<meta name="description" content="${1:Page description}">
<meta property="og:title" content="${2:Page title}">
<meta property="og:description" content="${1:Page description}">
<meta property="og:image" content="${3:https://example.com/cover.png}">
<meta name="twitter:card" content="summary_large_image">Responsive imagepicture
WebP with a JPEG fallback, fixed size and lazy loading
<picture>
<source srcset="${1:image.webp}" type="image/webp">
<img src="${2:image.jpg}" alt="${3:Description}" width="${4:800}" height="${5:600}" loading="lazy">
</picture>Input with a labellabeled
Labelled input with autocomplete and required
<label for="${1:email}">${2:Email}</label>
<input id="${1:email}" name="${1:email}" type="${3:email}" autocomplete="${4:email}" required>Native dialogdlg
dialog element whose buttons close it with a return value
<dialog id="${1:confirm}">
<form method="dialog">
<p>${2:Are you sure?}</p>
<button value="cancel">${3:Cancel}</button>
<button value="ok">${4:OK}</button>
</form>
</dialog>Changes in 1.0.0
First version.