Even though computers can now display a wide variety of fonts, the majority of IDEs and software text editors employ a monospaced font as the default typeface. This increases the readability of source code, which is often heavily reliant on distinctions involving individual symbols, and makes differences between letters more unambiguous in situations like password entry boxes where typing mistakes are unacceptable. Monospaced fonts are also used in terminal emulation and for laying out tabulated data in plain text documents. In technical manuals and resources for programming languages, a monospaced font is often used to distinguish code from natural-language text.Consequently, providing accessible "views" of monospaced font is one of AxAp's major goals. This page demonstrates several ways of using HTML markup to facilitate accessible reading and navigation of monospaced font in data files, program source code, etc.
ul) and supplemented by WAI-ARIA attributes (e.g.,
pre(preformatted) tag is the normal way to display rectangular blocks of monospaced font in HTML. So, it is something like a styled variant of the
divelement. Unlike the
tt(teletype) tag is the normal way to display inline sequences of monospaced font in HTML. So, it is something like a styled variant of the
spanelement. Unlike the
ttdoes not preserve spaces. The
br(break) tag can be added to force newline breaks, yielding a (flush left; ragged right) block of text. Each
nbsp(non-breaking space) character entity takes up a full position, so it can be used for indentation.
ul(ordered and unordered list) tags are normally used with the
li(list item) tag to create lists. However,
ulcan also be used a compact way to add an indentation level.
ullevels or sequences of
litags, supplemented by appropriate WAI-ARIA attributes.