Introduction:

In this article we are going to explain what is pre tag in html or why use pre tag in HTML or how to use ore element in html with example.

Description:

The HTML <pre> tag is used to specify pre formatted texts. The text between

<pre>.......</pre> tag is displayed in a fixed-width font. Usually it is displayed in Courier font. It maintains both space and line break.

 

Let's see an example of <pre> tag in HTML.

 

 <!DOCTYPE html>
<html>
<head>
    <title>This is the example of div tag</title>
</head>
<body>
    <pre> 
This is a formatted text  
by using the HTML pre tag. It maintains 
    both space and line break. 
</pre>  
</body>
</html> 

Output:

 html pre tag example

I hope this article will help to you after reading.

 Let's check live example

0 comments


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like