A file with .apkg extension is a deck of flashcards generated to be used in Anki software application which is a flashcard-based learning program. It contains HTML text to be loaded and displayed in Anki application and can additionally have images and sounds for visual and audible learning. Anki allows users to create their own Anki flashcard decks as well as import other user’s flashcard decks.
APKG File Format
Anki card decks are created from templates that are written in HTML, a famous and common language for creating web pages. The styling of deck cards is done using CSS which is the language used for styling web pages. The styling includes modifications to:
font-family - The name of the font to be used on the card.
font-size - The size of the font in pixels.
text-align - Defines whether the text should be aligned in the centre, left, or right.
color - Defines the colour of the text which can be simple colour names such as “blue”, “red”, etc. or HTML colour codes.
background-color - Defines the background colour of the card
The styling information is shared among all cards, affecting all cards when a change is made. The following example will use a yellow background on all cards except the first one:
Images resizing in an Anki card can be controlled as follow.