Write HTML and CSS quicker with with Zen Coding
A pretty neat plugin for TextMate (and a few other text editors) that I have started using is Zen Coding. I’d heard of it before but didn’t “get it” until I read Jonathan Christopher’s blog post The Art of zen-coding: Bringing Snippets to a New Level.
Jonathan explains very well what you can do with Zen Coding, so I’m not going to get into much detail. One example though. Zen Coding lets you use syntax that looks very much like CSS selectors to write HTML, which can look like this:
div#news.module>div.header+div.body>ul>li#item-$*5
When you put the cursor at the end of that line and execute the Zen Coding command, the result will be the following HTML snippet:
<div id="news" class="module"><div class="header"></div><div class="body"><ul><li id="item-1"></li><li id="item-2"></li><li id="item-3"></li><li id="item-4"></li><li id="item-5"></li></ul></div></div>
This is just one quick example of what Zen Coding can do. Try it out for yourself.
- Previous post: Användbarhetsboken – a free online book on usability
- Next post: Java is not JavaScript
Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.
Subscribe / follow
Sponsors
Authentic Jobs
- (re)define our guts: FarmersWeb seeking Lead Web Engineer at FarmersWeb, LLC (New York, NY, Ne, US)
- HL7 Experienced Developer at Entermotion
- Sales Engineer at arvato Systems North America (New York, NY, Toronto, Canada, Ne, US)
- Technical Consultant- New York & Chicago at arvato Systems North America (New York and Chicago, In, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost

