Whats the use of <pre> tag in html? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Whats the use of <pre> tag in html?

10th Jan 2018, 9:45 AM
althaf ua
althaf ua - avatar
2 Answers
+ 4
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. HTML pre Tag - TutorialsPoint https://www.tutorialspoint.com/html/html_pre_tag.htm
10th Jan 2018, 9:53 AM
Calviղ
Calviղ - avatar
+ 1
This tag take care of all the spaces, tabs and next lines. So it'll help in preserving the format of text you wrote in the code.
10th Jan 2018, 9:54 AM
Harjeet Singh
Harjeet Singh - avatar