HTML Snippets
Essential HTML snippets for faster development
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for HTML Snippets. The extension's id is html-snippets.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Zed HTML Snippets
A comprehensive collection of HTML snippets for Zed editor, designed to accelerate HTML development with intelligent autocomplete and placeholder support.
✨ Features
- Complete HTML5 Coverage: 95+ snippets covering all modern HTML5 elements
- Smart Placeholders: Tab-navigable placeholders for efficient coding
- Semantic HTML: Includes all semantic elements for modern web development
- Form Elements: Complete form controls and validation elements
- Media Elements: Audio, video, canvas, and responsive image snippets
- Accessibility Ready: ARIA-friendly snippets with proper attributes
📦 Installation
Via Zed Extensions (Recommended)
- Open Zed editor
- Press
Cmd/Ctrl + Shift + Pto open the command palette - Type "extensions" and select "zed: extensions"
- Search for "HTML Snippets"
- Click "Install"
Manual Installation
-
Clone this repository:
git clone https://github.com/seekode/zed-html-snippets -
Copy the extension to your Zed extensions directory:
- macOS:
~/.config/zed/extensions/ - Linux:
~/.config/zed/extensions/ - Windows:
%APPDATA%\Zed\extensions\
- macOS:
-
Restart Zed
🚀 Usage
Simply start typing any HTML element or use the prefix shortcuts. The snippets will appear in the autocomplete menu.
Quick Start Examples
| Prefix | Output | Description |
|---|---|---|
html | HTML5 boilerplate | Complete HTML5 document structure |
div | <div>$0</div> | Division element |
img | <img src="$1" alt="$2"> | Image with smart placeholders |
form | <form action="$1" method="$2">$0</form> | Form element |
button | <button type="$1">$2</button> | Button with type selection |
📋 Available Snippets
Structure & Semantics
html- HTML5 Boilerplatehead- Document headbody- Document bodyheader- Page/section headernav- Navigationmain- Main content areaarticle- Article contentsection- Content sectionaside- Sidebar contentfooter- Page/section footer
Text Content
h1-h6- Headingsp- Paragraphdiv- Generic containerspan- Inline containerblockquote- Block quotationpre- Preformatted textcode- Inline codestrong- Strong emphasisem- Emphasismark- Highlighted text
Lists
ul- Unordered listol- Ordered listli- List itemdl- Description listdt- Description termdd- Description definition
Links & Media
a- Anchor/linkimg- Imagepicture- Responsive imagesaudio- Audio playervideo- Video playersource- Media sourcetrack- Text track
Forms
form- Form containerinput- Input fieldtextarea- Text areaselect- Dropdownoption- Select optionoptgroup- Option groupbutton- Buttonlabel- Form labelfieldset- Field groupinglegend- Fieldset caption
Tables
table- Tablethead- Table headertbody- Table bodytfoot- Table footertr- Table rowth- Header celltd- Data cellcaption- Table caption
Interactive Elements
details- Collapsible contentsummary- Details summarydialog- Modal dialogcanvas- Drawing canvasprogress- Progress barmeter- Measurement gauge
Meta Elements
meta:desc- Meta descriptionmeta:kw- Meta keywordsmeta:char- Meta charsetmeta:vp- Meta viewportlink- External resource linkstyle- Internal stylesscript- JavaScript
🎯 Smart Placeholders
Snippets use numbered placeholders ($1, $2, etc.) that you can tab through:
<!-- Typing 'img' + Tab -->
<img src="$1" alt="$2">
<!-- Tab to $1, type image path, Tab to $2, type alt text -->
The $0 placeholder indicates the final cursor position.
🛠️ Customization
You can modify snippets by editing the snippets/html.json file. Each snippet follows this structure:
{
"Snippet Name": {
"prefix": "trigger-text",
"body": [
"<element attribute=\"${1:default}\">",
"\t$0",
"</element>"
]
}
}
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Fork the repository
- Clone your fork
- Make your changes
- Test in Zed
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Zed Team for creating an amazing editor
- HTML5 specification contributors
- Community feedback and contributions
📞 Support
- Issues: GitHub Issues
- Zed Community: Zed Discord
- Documentation: Zed Documentation
Happy coding with Zed! 🚀