Flag-Icon Element is a custom-element version of flag-icon-css. It's approximately 300 bytes when bundled and compressed. Flag images are loaded from the cloudflare CDN by default.
Include it in your page and set the country property. e.g.
<p>Greetings from <flag-icon country="ca"></flag-icon>, eh!</p>
Produces:
Greetings from
Default flags are 4:3 layout, set squared attribute for 1:1 and use css font-size to control the size
<flag-icon country="us" squared style="font-size: 28px"></flag-icon>