This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16600 - pre is stylistic (typografic) rather than semantic. it always has been. The use-cases should be rewritten so it becomes semantic (What is semantically wrong with using code in a p instead of a pre?) In fact, personally I do not think pre has any semantic
Summary: pre is stylistic (typografic) rather than semantic. it always has been. The u...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-02 10:33 UTC by contributor
Modified: 2012-07-26 23:34 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2012-04-02 10:33:34 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html
Multipage: http://www.whatwg.org/C#the-pre-element
Complete: http://www.whatwg.org/c#the-pre-element

Comment:
pre is stylistic (typografic) rather than semantic. it always has been. The
use-cases should be rewritten so it becomes semantic (What is semantically
wrong with using code in a p instead of a pre?) In fact, personally I do not
think pre has any semantic value, so why keep it other than the fact it is
used so often? Simply deprecate it. Browsers can still render it so it will
remain backwards compatible?

Posted from: 88.244.70.57
User agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0
Comment 1 contributor 2012-07-18 17:18:18 UTC
This bug was cloned to create bug 18107 as part of operation convergence.
Comment 2 Ian 'Hixie' Hickson 2012-07-26 23:34:22 UTC
> pre is stylistic (typografic) rather than semantic. it always has been.

That is indeed what the spec says.


> The use-cases should be rewritten so it becomes semantic

The use cases are what they are, we can't just change them arbitrarily. :-)


> (What is semantically wrong with using code in a p instead of a pre?)

Depends what you're marking up. If you're trying to mark up ASCII art, where the formatting matters, then using a <p> is probably not really sensible.


> In fact, personally I do not
> think pre has any semantic value, so why keep it other than the fact it is
> used so often?

It's needed for things like showing markup examples or code snippets, where space formatting is important. The spec itself uses it a zillion times, for example.

I don't understand the problem here.