How to create teletext in HTML?

王林
Release: 2023-08-31 16:01:02
forward
795 people have browsed it

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>
Copy after login

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>
Copy after login

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>
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!