Learn html - html tutorial - pre tag - html examples - html programs
The <pre> tag is representing preformatted text.
The text within this element is displayed in monospace font.
The <pre> tag is displayed with fixed-width font and it reserves both line break and spaces.
<pre> tag is belongs to Palpable content and Flow content .
Syntax for <pre> tag in HTML:
<pre> content</pre>
Differences between HTML 4.01 and HTML 5 for <pre> tag:
HTML 4.0.1
HTML 4 is supports all the attributes of <pre> tag.
HTML 5
HTML 5 is not supports width attribute of <pre> tag.
Sample Coding for <pre> tag in HTML:
Tryit<!DOCTYPE html>
<html >
<head>
<title> Wikitechy pre tag</title>
</head>
<body>
<h3> Wikitechy HTML pre tag.</h3>
<pre>
The HTML pre element represents preformatted text.
Whitespace inside this element is displayed as typed.
</pre>
<p>
The HTML pre element represents preformatted text.
Whitespace inside this element is displayed as typed.
</p>
</body>
</html>
Code Explanation for <pre> tag in HTML:
The text within the <pre> element will be displayed as a preformatted text.
Output for <pre> tag in HTML:
<pre> tagged text is displayed the preformatted form with line break and spaces.
But the normal text remove unwanted spaces.
Attribute for <pre> tag:
Attribute
Value
HTML 4
HTML 5
Description
width
number
Yes
No
It is used to set the maximum number of a characters per line.
Browser Support for <pre> tag in HTML:
Tips and Notes
By using the <pre> element the text is displayed with unusual format or some sort of computer code.
It displayed line between the paragraphs.
Related Searches to <pre> tag in html
code tag
html pre tag example
html pre tag wrap
html pre vs code
bootstrap pre tag
html pre tag line break
html pre width
bootstrap pre
blockquote tag in html
html tutorials html editor html code html form html tutorial html color html color codes html table html img html5 html code for website html and css html programs html website free html editor html5 tutorial wysiwyg html editor html tutorial pdf html converter php tutorial html example html tutorial css tutorial html css html tags html basics code html html online html mailto html lang html tags list