htmlcssmarkdowngithub-flavored-markdownreadme

how can i put fontawesome icons in markdown ? (readme file that will be uploaded to github)


I want to put some fontawesome icons in my readme to explain what they mean in my website but markdown doesnt allow css so is there a way I can overcome this?

This is where I got the icon

This would be the html <i class="fas fa-crown"></i>

This is the stylesheet link <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">


Solution

  • Simple, you can't!


    What you can do is download the image you want and include it, for example:

    ![fa-crown](fa-crown.svg)
    

    or

    <img src="fa-crown.svg" width="50" height="50">
    

    If you want to learn more: GitHub Flavored Markdown Spec


    Update

    You can also use the FontAwesome images hosted on the FontAwesome GitHub repo. Therefore you can use it like this:

    <img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/crown.svg" width="50" height="50">
    

    You will see this: