'A <draw:custom-shape> is made into a <div> in HTML which is then styled'

def s_custom_shape(self, tag, attrs):

    anchor_type = attrs.get((TEXTNS, 'anchor-type'), 'notfound')
    htmltag = 'div'
    name = ('G-' + attrs.get((DRAWNS, 'style-name'), ''))
    if (name == 'G-'):
        name = ('PR-' + attrs.get((PRESENTATIONNS, 'style-name'), ''))
    name = name.replace('.', '_')
    if (anchor_type == 'paragraph'):
        style = 'position:absolute;'
    elif (anchor_type == 'char'):
        style = 'position:absolute;'
    elif (anchor_type == 'as-char'):
        htmltag = 'div'
        style = ''
    else:
        style = 'position:    absolute;'
    if ((SVGNS, 'width') in attrs):
        style = (((style + 'width:') + attrs[(SVGNS, 'width')]) + ';')
    if ((SVGNS, 'height') in attrs):
        style = (((style + 'height:') + attrs[(SVGNS, 'height')]) + ';')
    if ((SVGNS, 'x') in attrs):
        style = (((style + 'left:') + attrs[(SVGNS, 'x')]) + ';')
    if ((SVGNS, 'y') in attrs):
        style = (((style + 'top:') + attrs[(SVGNS, 'y')]) + ';')
    if self.generate_css:
        self.opentag(htmltag, {'class': name, 'style': style})
    else:
        self.opentag(htmltag)
