Click here to Skip to main content
14,660,457 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi.i want to know that why shouldnt use <pre> tag in html

What I have tried:

Hi.i want to know that why shouldnt use <pre> tag in html
Posted
Updated 7-Nov-17 14:20pm
v2

Rate this:
Please Sign up or sign in to vote.

Solution 2

As Richard has said, there is no need whatsoever to not use the pre tag in HTML - as long as you understand that everything enclosed in the tag is pre-formatted (there was a hint the name :-)) It will be rendered exactly as is.

Here's a couple of links that explain it more thoroughly
Everything You Need to Know About HTML's 'pre' Element — SitePoint[^]
Considerations for styling the < pre > tag - The Media Temple Blog[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 1

No reason whatsoever. As you can see this page is HTML and contains <pre> tags around part of your message.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Hello Op,

As stated within the solutions you are free to use the tag since it is not outdated in Java API.

More information can be found here:

HTML pre tag[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100