Custom Styles in GitHub Readme Files
GitHub readme files — usually ./readme.md — are Markdown, and Markdown does allow HTML. Even so, you can't drop <style> or <script> tags into them: the tags are stripped, so your custom styling never lands. Or so it seems.
There is a route around that limitation:
- An SVG can be embedded as an
<img src="./file.svg" alt="" />, and that works anywhere. - When an SVG is used this way, even animations inside it play.
- SVG provides
<text>for textual content, and<foreignObject>for ordinary HTML content. - SVG supports
<style>tags. - Your
readme.mdfile does support<img>elements pointed at SVG sources.
Sindre Sorhus put all of those pieces together in an example.
The same SVG source also works here:



