HTML Pre Tag


HTML

 Tag

This HTML

 Tag is used to specify the pre-formatted text. The text inside the 
 Tag is displayed in a certain width font. Usually, it is displayed in courier fonts. It maintains both space and line brakes.

Pre

 Tag is widely used to display language examples e.g. Java, C #, C, C ++, etc. because it displays the typed code.

The HTML

 Tag defines pre-formatted text.

Example:-




    
    
        HTML pre Tag
    



This is HTML pre Tag Example

     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 

Output:-

HTML P Tag

HTML

Tag

This HTML

Tag is used to define a paragraph in a webpage. Let’s take a simple example to see how it works. It is a significant point that the browser itself adds blank lines before and after paragraphs. The HTML
tag indicates the beginning of a new paragraph. Write a new paragraph within

Tag.

Example:-




    
    
        HTML p Tag
    



This is HTML p Tag Example

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Output:-

What is the Difference Between p and pre-tag?

If you want to write a straight paragraph together, the

Tag is used while in the

 Tag you can break the line without using the paragraph 
Tag
. Simply writing in a new line means that its output will also come in a new line.

Tag is used to creating more websites.

Tip: This tag is not disliked. However, it is possible to achieve a rich effect using CSS (see example below).

HTML Tag

HTML Tag

HTML Tag

HTML

 Tag

HTML Tag


1 thought on “HTML Pre Tag”

Leave a Comment