Keyboard and File Paths style

Tiny forum tip, as not seen it shared.

To put nice styling around a ‘key’ as in ‘Press the Space Bar now’ you do this:

Press the <kbd>Space Bar</kbd> now

So we allow-list the kbd tag, note: the ending one has that close / character before the kbd bit.

Press Ctrl + Any to now continue.

Press <kbd>Ctrl</kbd> + <kbd>Any</kbd> to now continue.

While we’re here, if you want to put a filename or computer path you can use three ` characters around it, so something like ‘Please go to C:\Users\BillG\passwords.txt and print it’ would look like this:

Please go to ```C:\Users\BillG\passwords.txt``` and print it'

…so handy if a fixed font fan.

5 Likes