What is pre Tag in HTML. Definition & Example
What is the <pre> Tag
Key Features of <pre> tag.
.
.
- <pre> tag defines preformatted text. text in <pre> element display fixed-width font and text preserves.
- <pre> tag use preserves space, fixed-width
how to use the pre tag in html
Example
how to use the pre tag in html
Explain Program
Step 1]
<!DOCTYPE html>
This declare the document type.
browser that the document is written in html
Step 2 ]
<html>.... . </html>
html is the root element of the html page.
Every thing inside it is part of the webpage.
Step 3]
<body>.....</body>
<body> tag contains all the visible content of the page.
inside <body> show the browser screen.
Step 4]
<h1>The pre Element</h1>
<h1> creates the largest heading tag.
heading tag use the main title.
Step 5]
<pre> ...</pre>
preserves spaces and formatting
preserves line breaks
preserves fixed-width
Step 6]
closing the Tag

Post a Comment