A comprehensive collection of HTML snippets for Zed editor, designed to accelerate HTML development with intelligent autocomplete and placeholder support.
- 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
- Open Zed editor
- Press
Cmd/Ctrl + Shift + P
to open the command palette - Type "extensions" and select "zed: extensions"
- Search for "HTML Snippets"
- Click "Install"
-
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
Simply start typing any HTML element or use the prefix shortcuts. The snippets will appear in the autocomplete menu.
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 |
html
- HTML5 Boilerplatehead
- Document headbody
- Document bodyheader
- Page/section headernav
- Navigationmain
- Main content areaarticle
- Article contentsection
- Content sectionaside
- Sidebar contentfooter
- Page/section footer
h1
-h6
- Headingsp
- Paragraphdiv
- Generic containerspan
- Inline containerblockquote
- Block quotationpre
- Preformatted textcode
- Inline codestrong
- Strong emphasisem
- Emphasismark
- Highlighted text
ul
- Unordered listol
- Ordered listli
- List itemdl
- Description listdt
- Description termdd
- Description definition
a
- Anchor/linkimg
- Imagepicture
- Responsive imagesaudio
- Audio playervideo
- Video playersource
- Media sourcetrack
- Text track
form
- Form containerinput
- Input fieldtextarea
- Text areaselect
- Dropdownoption
- Select optionoptgroup
- Option groupbutton
- Buttonlabel
- Form labelfieldset
- Field groupinglegend
- Fieldset caption
table
- Tablethead
- Table headertbody
- Table bodytfoot
- Table footertr
- Table rowth
- Header celltd
- Data cellcaption
- Table caption
details
- Collapsible contentsummary
- Details summarydialog
- Modal dialogcanvas
- Drawing canvasprogress
- Progress barmeter
- Measurement gauge
meta:desc
- Meta descriptionmeta:kw
- Meta keywordsmeta:char
- Meta charsetmeta:vp
- Meta viewportlink
- External resource linkstyle
- Internal stylesscript
- JavaScript
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.
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>"
]
}
}
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.
- Fork the repository
- Clone your fork
- Make your changes
- Test in Zed
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Zed Team for creating an amazing editor
- HTML5 specification contributors
- Community feedback and contributions
- Issues: GitHub Issues
- Zed Community: Zed Discord
- Documentation: Zed Documentation
Happy coding with Zed! 🚀