For example, I want to create this code:
<ul id="nav">
....
</ul>
in other editors I can write smth like that: ul#nav Can I use smth similar to this in WebStorm?
Yes you can. It's called Emmet (https://emmet.io/) and WebStorm supports standard Emmet abbreviations as well as such dynamic expanding.
WebStorm help pages: