'Create an open HTML tag'

def opentag(self, tag, attrs={}, block=False):

    self.htmlstack.append((tag, attrs, block))
    a = []
    for (key, val) in attrs.items():
        a.append(('%s=%s' % (key, quoteattr(val))))
    if (len(a) == 0):
        self.writeout(('<%s>' % tag))
    else:
        self.writeout(('<%s    %s>' % (tag, '    '.join(a))))
    if (block == True):
        self.writeout('\n')
