Improve html <div> snippet

The "class" attribute is commonly set for <div>s, but the current
snippet definition makes it difficult to create any attributes other
than "id".  Setup that attribute as the id is done, so that either or
both may be easily included.