CSS font-family of cmd.exe

Hard Rain picture Hard Rain · Jan 11, 2013 · Viewed 7.4k times · Source

I can't find any font-family in CSS, which is similar to the font-family used in the CMD.exe. Could you please help me?

console font

Answer

Eric J. picture Eric J. · Jan 11, 2013

You can use

font-family:monospace

to specify that you wish a monospaced font to be used.

The console uses a monospaced font to ensure that all characters have the same width.

Note that some browsers do not correctly implement monospaced, though there are approaches to fix that, e.g.

http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/