wrap(tag, content, attrs = {}) {
        const htmlAttrs = Object.entries(attrs)
            .map(([key, value]) => ` ${key}="${value}"`)
            .join('');
        if (!content) {
            return `<${tag}${htmlAttrs}>`;
        }
        return `<${tag}${htmlAttrs}>${content}</${tag}>`;
    }
Wraps content in an HTML tag, adding any HTML attributes

@param {string} tag HTML tag to wrap
@param {string | null} content content within the tag
@param {[attribute: string]: string} attrs key-value list of HTML attributes to add

@returns {string} content wrapped in HTML element