I found interest plugin for most IDEs (and for textmate too), named Zen Coding.
It lets you take advantage of writing html as css selectors.
As example:
a.no-trans[href="#"]>img.bordered
will be converted to
<a class="no-trans" href="#"><img class="bordered" src="" alt="" /></a>
And, if you wish something harder… looks at this:
div.catalog>ul>li*4>(div>a[href="#"]>img)+(div>a[href="#"]{item_name})+(div.rating>(img*5))+(table.w100>tr>td*2)+(div.links>a[href="#"]{Подробнее}+a[href="#"]{Добавить к сравнению})
Converted to
<div class="catalog">
<ul>
<li>
<div><a href="#"><img src="" alt="" /></a></div>
<div><a href="#">item_name</a></div>
<div class="rating">
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
<table class="w100">
<tr>
<td></td>
<td></td>
</tr>
</table>
<div class="links"><a href="#">Подробнее</a><a href="#">Добавить к сравнению</a></div>
</li>
<li>
<div><a href="#"><img src="" alt="" /></a></div>
<div><a href="#">item_name</a></div>
<div class="rating">
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
<table class="w100">
<tr>
<td></td>
<td></td>
</tr>
</table>
<div class="links"><a href="#">Подробнее</a><a href="#">Добавить к сравнению</a></div>
</li>
<li>
<div><a href="#"><img src="" alt="" /></a></div>
<div><a href="#">item_name</a></div>
<div class="rating">
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
<table class="w100">
<tr>
<td></td>
<td></td>
</tr>
</table>
<div class="links"><a href="#">Подробнее</a><a href="#">Добавить к сравнению</a></div>
</li>
<li>
<div><a href="#"><img src="" alt="" /></a></div>
<div><a href="#">item_name</a></div>
<div class="rating">
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
<table class="w100">
<tr>
<td></td>
<td></td>
</tr>
</table>
<div class="links"><a href="#">Подробнее</a><a href="#">Добавить к сравнению</a></div>
</li>
</ul>
</div>
P.S. For some reason, in text ZC conflicts with some built-in hotkeys. And i found best way(for me) to replace them:
Change "Expand abbrevation" to (Command + Shift + E)
Unbind "Select next item", "Select previous item" 'cause they're conflicts with indentation of text (Command + ])
Unbind "Split or join tag", 'cause it conflicts with delete line bound to (Command + K)