It's been a while since I've had to do any HTML-like code in Vim, but recently I came across this again. Say I'm doing a simple bit of a HTML page:
<html><head><title>This is a title</title></head></html>
Check this out..
Functions and mappings to close open HTML/XML tags
I use something similar.