Home >Web Front-end >HTML Tutorial >How to create teletext in HTML?
In this article we are going to learn about how to create teletype text in HTML.
Use a teletype or typewriter-style fixed-width font to display inline text created by the tag.
Monospaced fonts, single fonts, and non-proportional fonts all refer to the same thing. They both refer to a font whose characters are all the same number of pixels wide and are used interchangeably.
Note − Not supported in HTML5
Following is the syntax for teletype text.
<tt> Contents... </tt>
To better understand how to create teletext in HTML
The Chinese translation ofIn the example below, we use the tag.
<!DOCTYPE html> <html> <body> <p>Welcome to TuttorialsPoint</p> <p><tt>The Best E-Way Learning.</tt></p> </body> </html>
When the script is executed, it generates an output containing two paragraphs: a normal paragraph, and a paragraph using the tag on the web page.
Consider the example below, we are using CSS to achieve the Teletype effect.
<!DOCTYPE html> <html> <body> <p>Welcome To Tutorials.</p> <p style="font-family: monospace">Where You Can Find A Lot Of Courses.</p> </body> </html>
After running the above script, the output window pops up and displays two texts. One is normal text and the other uses a monospace font style on the web page.
The above is the detailed content of How to create teletext in HTML?. For more information, please follow other related articles on the PHP Chinese website!