Asked 2 years ago
16 Feb 2022
Views 603
shyam

shyam posted

how to use HTML <pre> Tag ?

i am new to HTML and HTML5 , so can you help me how to use HTML <pre> Tag and what is use of HTML <pre> Tag ?
sarah

sarah
answered Feb 16 '22 00:00

<pre> HTML tag show preformatted text.it give proper formating to the inner text

mostly <pre> HTML tag used to print debug data show properly .
i use like this in php

<pre>
<?PHP print_r($object); ?>
</pre>

jaman

jaman
answered Feb 16 '22 00:00

how to apply css to <pre> html tag ?


 pre {
  display: inline;
  font-size: 12px;
   margin: 10em ;
padding:12px;
}


<pre>This is the test </pre> 
Post Answer