TransWikia.com

How can markdown the national flags in jupyter notebook?

Stack Overflow Asked by Mario on September 18, 2020

I want to insert images of national flags from a URL source and Markdown code block in Jupyter Notebooks as following examples:

Flags

I have found a similar method they used flag codes in excel
Like this:

|Teams          | Nationality flag  |
| ------------- |:-----------------:|
| Germany       |  GER              |
| Iran          |  IRI              |
| Italy         |  ITA              |

Any helps will be appreciated.

One Answer

  • Just like you do in SO

  • In a markdown cell, create the markdown table, add the link to the image file, and run the cell.

    • enter image description here
  • Flags from Flagpedia

Style 1: In a Markdown Cell

|Teams          | Nationality flag  |
| ------------- |:-----------------:|
| CA            |  ![](http://usa.flagpedia.net/data/flags/mini/ca.png)              |

Style 2: In a Markdown Cell

|Teams          | Nationality flag  |
| ------------- |:-----------------:|
| CA            |  ![][ca]          |

  [ca]: http://usa.flagpedia.net/data/flags/mini/ca.png

Style 3: In a Markdown Cell

|Teams          | Nationality flag  |
| ------------- |:-----------------:|
| CA            |  ![ca]            |

  [ca]: http://usa.flagpedia.net/data/flags/mini/ca.png

All styles produce

enter image description here

Correct answer by Trenton McKinney on September 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP