Home  >  Article  >  Web Front-end  >  How to create teletext in HTML?

How to create teletext in HTML?

王林
王林forward
2023-08-31 16:01:02772browse

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

grammar

Following is the syntax for teletype text.

<tt> Contents... </tt>

To better understand how to create teletext in HTML

The Chinese translation of

Example 1

is:

Example 1

In 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.

Example 2: Using CSS

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete