HTML <pre> Tag
The HTML <pre> tag is used for indicating preformatted text.
The code tag surrounds the code being marked up.
Browsers normally render pre text in a fixed-pitched font, with whitespace in tact, and without word wrap.
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Pre Element</title>
</head>
<body>
<pre>
This text is
in a fixed-pitch
font, and it preserves
both white spaces and line breaks.
</pre>
</body>
</html>
Output
This text is
in a fixed-pitch
font, and it preserves
both white spaces and line breaks.
in a fixed-pitch
font, and it preserves
both white spaces and line breaks.
Global Attribute
The tag support all the global attributes described in HTML Attribute Reference.
Specific Attribute
The HTML <pre> tag also supports the following additional attributes −
Attribute ----- Value ---- Description
width ----- number ---- Deprecated − It specifies the desired width of the pre-formatted text.
Event Attrubutes
The Tag Support all the event Attributes described in -- HTML Events Reference ( Soon.. )
Browser Support
Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes
Watch This Video For More Information
0 comments:
Post a Comment
For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.