Web Development Certification Training
- 5k Enrolled Learners
- Live Class
The <pre> tag in HTML is used for identifying preformatted text. The code tag is surrounded by the code being marked up. Let’s understand this
In your web browsers usually render pretext in a fixed-pitched font, with the whitespace intact, and without the word wrap.
In this, the pre tag will allow the same space and the font with respect to the user entered. The below mentioned is the specific attributes in which the pre tag in HTML will support in the table mentioned.
This HTML <pre> tag will also support the following additional attributes:
Description: This one specifies the required width of the pre-formatted content.
Here listing out all the browsers which are supporting. It’s given it the table mentioned below. So if you have any of these it will support.
<!DOCTYPE html> <html> <head> <title> pre tag in HTML</title> </head> <body> <pre> This is the content writing for the HTML pre tag. Includes the code here. </body> </html>
<!DOCTYPE html> <html> <head> <title> pre tag in HTML</title> </head> <body> <pre> I'm working for edureka Writing blogs on the programming language </body> </html>
With this, we come to an end of this article on pre tag in HTML. I hope you got an idea on how to preformat a text in HTML with these examples. DO check our other blogs on HTML.
Check out our Full Stack Web Developer Masters Program which comes with instructor-led live training and real-life project experience. This training makes you proficient in skills to work with back-end and front-end web technologies. It includes training on Web Development, jQuery, Angular, NodeJS, ExpressJS, and MongoDB.