简体   繁体   中英

How to set a favicon to text

I know it is possible to set a favicon from an image like so:

<link rel="icon" href="favicon.ico">

Is there a way to set it as text instead?

You can encode a Data URI of an SVG that contains a text element ( source ):

<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>👍</text></svg>">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM