Closed Bug 309676 Opened 19 years ago Closed 19 years ago

<caption> is being rendered as a block-level element by default, should be inline insteadw

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tonglebeak, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

http://www.w3.org/TR/html401/struct/tables.html#edef-CAPTION

As you can see, the caption is suppoesd to be rendered as inline by default.
However, it appears to be rendered as block by default instead.

The fact that the width that is being set on the caption and obeyed shows that
it's not being rendered as inline, since inline elements can't be resized by
setting dimensions in CSS.
Attached file testcase
This shows undoubtedly that the width setting is being obeyed, and thus the
caption is not being rendered as an inline element.
The recommended default value of display for caption in CSS 2 is "table-caption".
See http://www.w3.org/TR/CSS21/sample.html

What the DTD says is not really relevant: for example, a paragraph can only
contain inline content but is (by recommended default) displayed as a block.
If you examine the testcase with DOM inspector (see Object - Computed style),
the display value of the caption element is table-caption which is what it
should be according to spec.
http://www.w3.org/TR/CSS21/tables.html#value-def-table-caption
http://www.w3.org/TR/CSS21/visuren.html#propdef-display
What the HTML 4.01 spec only says is that caption element should hold inline
elements.
I don't think this bug is valid.
After reading the specs further, it does explicitly state that a caption is like
a block-level element.

Invalid then.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: