Monospace (Typewriter) Fonts - HTML

Another text tag that has survived deprecation is the teletype (<tt>), or monospaced, tag. This tag tells the user agent that certain text should be rendered in a monospaced font. Such uses include reserved words in documentation, code listings, and so on. The following code shows an example of the teletype tag in use:

<p>Consider using the <tt>date</tt> function instead.</p>

This tag is named for the teletype terminals used with the first computers, which were only capable of printing in a monspaced font.

Tip:Again, the use of styles is preferred over individual inline tags. If you need text rendered in a monospace font, consider directly specifying the font parameters using styles instead of relying upon the <tt> tag.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

HTML Topics