Pre Tag in HTML
html
html5
HTML Tutorial
HTML Properties
HTML tags
The Web browser is ignored space, line breaks, and other formatting characters of text. If you wanted some format, then tag or attribute must have used every time. It is used to remove this drawback. Pre tag is used to keep the text format as it is. It is changed when CSS tags are applied. It shows the preformatted text of the content.
Syntax:
HTML has many tags for different purpose.
Example:
, etc.</li> </ul> <p>A pre tag has an opening tag as well as a closing tag like other HTML tags.</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><pre class="brush:php;toolbar:false"> content of web
Copy after login
The above syntax used where we need the preformatted text of the content.
How Pre Tag Works In HTML?
Below is the explanation for how Pre tag work:
1. Using Pre Tag In Html
Code:
<!DOCTYPE> <html> <head> <title> using pre tag in html </title> </head> <body> <pre class="brush:php;toolbar:false"> The Web browser is ignored space, line breaks, and other formatting characters of text. If you wanted some format then tag or attribute must have used every time. Pre tag in HTML used to remove this drawback. Pre tag used to keep text format as it is. It is changed when CSS tags are applied. Pre tag in HTML shows the preformatted text of the content.