Home >Web Front-end >HTML Tutorial >Pre Tag in HTML
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> <pre class="brush:php;toolbar:false"><pre class="brush:php;toolbar:false"> content of web
The above syntax used where we need the preformatted text of the content.
Below is the explanation for how Pre tag work:
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.