HTML, html css, html css tutorial for beginners, html css full course, html for beginners, html full course, css full course, css tutorial for beginners

HTML mein `pre` formatting tag ka use preformatted text ko display karne ke liye hota hai. Is tag ka use karke text ko exactly waise hi display kiya jata hai jaisa wo HTML document mein likha gaya hai, including spaces aur line breaks. Yeh tag fixed-width font (usually monospace) mein text ko render karta hai.

`pre` tag ka use typically tab kiya jata hai jab aapko code snippets ya ASCII art display karni ho.

Example:

```html
<!DOCTYPE html>
<html>
<head>
    <title>HTML Preformatted Text</title>
</head>
<body>
    <h1>Preformatted Text Example</h1>
    <pre>
        This is some preformatted text.
        It preserves spaces
        and line breaks.
        
        function helloWorld() {
            console.log("Hello, World!");
        }
    </pre>
</body>
</html>
```

Is example mein:
- `<pre>` tag ke andar ka text exactly waise hi render hota hai jaisa HTML document mein likha gaya hai, including multiple spaces aur line breaks.
- Yeh useful hota hai jab aapko text ko exact formatting ke sath display karna ho, jaise code snippets, poetry, ASCII art, etc.

Comments