The width attribute for <pre>, which defines maximum character length per line, was deprecated in HTML 4.01, and I no longer see it in current draft of HTML5. I couldn’t find the reason behind it in the mailing lists of W3C’s WG for HTML (maybe I searched wrong), although the specs for 4.01 said it was not supported in all clients.
- One possible answer: it makes no sense to wrap preformatted texts. Is this true?
- In case I still want it to wrap after for example 30 characters. Besides scripting, how do I achieve this?
Not a conclusive answer, but it looks like it was deprecated because it was never properly supported (and because it’s a presentational concern, and therefore not really something HTML should contain)….
Take a look at it’s mention in the HTML 4.01 spec, it mentions it’s not widely supported and that it’s used to “select an appropriate font size or indent appropriately”–which sounds pretty far off from “defines the number of characters per row”.
The normal reason for these old HTML elements/attributes to go away is that they’re better aligned with CSS than HTML–HTML is supposed to be just content, not presentation.