How to Use HTML pre Tag with Examples
How to Use <pre> Tag HTML (With Examples)
html Pre Tag
❋ The <pre> tag defines preformatted text.Text in a <pre> element is displayedto the fixed-width font usually Courier and it How to Create Paragraphs in HTMLs preserves both spaces and line breaks.
❋ Use the <pre> element when displaying text with unusual formatting, or some sort of computer code.
· ❋ <pre> stands for preformatted is used to display text exactly as it is written in the HTML code.
❋ It preserves both spaces and line breaks
how to use pre tag html with example
Explain Program
<!DOCTYPE html>
<html>
<body>
<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
</body>
</html>
Explain Program
Step 1 ]
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
Step 2 ]
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
Step 3 ]
<body> ... </body>
- HTML document that holds visible content on the page.
- anything contains type inside <body> will be display the browser
<body> ... </body>
- HTML document that holds visible content on the page.
- anything contains type inside <body> will be display the browser
Step 4]
<pre> ....</pre>
- <pre> tag is Preformatted text tag
- <pre> tag inside use space and line breaks .
how to use pre tag html with example
OUTPUT IN PRE TAG
Related Post :-


Post a Comment