Que es la etiqueta “pre” y para que sirve? ['ESP' , 'ENG']

in StemSocial5 months ago

La palabra “pre” proviene de pre formatear, en resumen, significa texto del archivo pre formateado, un texto pre formateado quiere decir que el texto se mostrara tal cual como se escribió, ya sea con sus respectivos saltos líneas, espacios en blancos y demás.

The word “pre” comes from pre-format, in short, it means text from the pre-formatted file, a pre-formatted text means that the text will be displayed as it was written, either with its respective line breaks, white spaces and so on. .


pre1.jpg
Uno se preguntará para que sirve esta etiqueta si solo va a mostrar el texto tal cual como fue escrito y a decir verdad tiene un buen uso porque no evitamos el tener que buscar alguna manera de tener que recurrir a los estilos para acomodar el texto según lo deseamos.

One may wonder what this label is for if it is only going to show the text as it was written and to tell the truth it has a good use because we do not avoid having to look for some way to have to resort to the styles to arrange the text as we wish. .


pre3.jpg
Esta etiqueta tiene soporte en todos los navegadores y aquí te dejare un ejemplo de un caso en que vale la pena utilizar este tipo de etiquetas en el código, para mostrar el código mismo; hecho con javascript.

This tag is supported in all browsers and here I will leave you an example of a case in which it is worth using this type of tags in the code, to show the code itself; made with javascript.
Sort:  

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.