How to use smaller font size in a GitHub table?

Viewed 5771

How to use a smaller font size in a GitHub readme.md?

I am trying to figure out how to use smaller text in the GitHub readme.

More specifically, I created a table and I want the font size to be smaller for this table.

I saw somewhere people recommended to use which I tried and does not work.

Table:

| Embedding       | Script        |
|-----------------|---------------|
| word2Vec        | abc.sh        |
| code2Vec        | cde.sh        |

The intention is to make the font size for the complete table smaller.

Can anyone please advise me what's the workaround?

3 Answers

Github doesn't allow inline-styles or classes. A workaround is to wrap sub tag around each element.

Embedding Script
word2Vec abc.sh
code2Vec cde.sh

If you layer them like this, <sub><sup>combining the two tags</sup></sub>, you get tiny text that's almost in line with the normal text. Nice for making very small caveats to your answers!

GitHub doesn't permit you to adjust font sizes, styles, or colors when it renders Markdown. That's because the text needs to be legible on all sorts of systems with all sorts of font sizes and in both light and dark mode.

Just because you can read and see smaller text in your table does not mean that others can (I know people who have vision problems and cannot), and for legal reasons as well as general good site design, GitHub wants its site to be accessible for all users on all platforms.

In addition, allowing user-provided styles has potential security and abuse implications, which is another reason it's not allowed. For example, users could include tiny, invisible, or otherwise unreadable text to game search result rankings or include other objectionable text that would be visible to computers but not to humans.

Related