HTML | <pre> width Attribute
The HTML <pre> width Attribute is used to specify the maximum number of characters per line.
Syntax:
<pre width="number">
Attribute Values:
- number: It is used to set the maximum number of characters.
Example:
<!DOCTYPE html> <html> <head> <title> HTML pre width Attribute </title> <style> h4 { text-align:center; } </style> </head> <body> <h1 style="color:green;">GeeksforGeeks</h1> <h2>HTML <pre> width Attribute</h2> <pre width="10">GeeksforGeeks A Computer Science Portal For Geeks </pre> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The HTML <pre> width attribute is not supported by any browsers. CSS property are used instead.
Recommended Posts:
- HTML | <td> width Attribute
- HTML | <hr> width Attribute
- HTML | <col> width Attribute
- HTML | <th> width Attribute
- HTML | <col> width Attribute
- HTML | <img> width Attribute
- HTML | <input> width Attribute
- HTML | <iframe> width Attribute
- HTML | <object> width Attribute
- HTML <video> width Attribute
- HTML | <table> width Attribute
- HTML | <canvas> width Attribute
- HTML | Marquee width attribute
- HTML | <colgroup> width Attribute
- HTML | <embed> width Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



