The frame attribute on a <table> selects which sides of the outer border are drawn. Values include void, above, below, hsides, vsides, lhs, rhs, box, and border.
It is presentational. For new pages, use CSS border-style and border-width (or the border shorthand). Related legacy attributes: border (outer width) and rules (inner lines).
Deprecated.
Do not use frame in new pages. Prefer CSS borders. Browsers still support it for old tables — learn it to read legacy HTML.
Not the <frame> element.
This attribute belongs to <table>. The obsolete <frame> / <frameset> layout model is separate — use <iframe> for embeds.
Syntax
HTML Syntax
syntax.html
<table frame="value">
Often paired with border="1" (or similar) so the outer border has a visible width.
Values
Attribute Values
Enumerated sides of the table’s outer frame:
Value
Description
Try it
void
No outer sides (default). Often implied when border="0"
border on the table replaces frame="box" + border="1".
Cell borders replace legacy rules when you need a grid.
border-collapse keeps lines tidy between cells.
No presentational HTML — styles stay in CSS.
Edge Cases & Pitfalls
Most confusion is naming: table frame vs frameset <frame>.
deprecated
Do not use in new UI
Presentational table attributes are superseded by CSS. Keep them only for legacy maintenance.
vs
Not <frame> / frameborder
frameborder belongs to frames/iframes. Table frame only picks outer border sides.
border
Needs a visible border width
Without border (or CSS), frame may look like it does nothing. border="0" effectively voids the frame.
rules
Inner lines are separate
Use rules (legacy) or CSS cell borders for lines inside the table.
script
IDL: HTMLTableElement.frame
Also deprecated in the DOM API. Prefer CSS classes instead of setting table.frame.
Compatibility
Browser Support
frame is a deprecated HTML attribute on tables in the browser. It is not a Node.js, Deno, or Bun API.
✓ Deprecated · Still widely parsed
frame
Still recognized in major browsers for legacy tables, but marked deprecated. Prefer CSS borders for new work.
97%Legacy recognition (approx.)
Google ChromeSupported (legacy)
Supported
Mozilla FirefoxSupported (legacy)
Supported
Apple SafariSupported (legacy)
Supported
Microsoft EdgeSupported (legacy)
Supported
OperaSupported (legacy)
Supported
Samsung InternetModern
Supported
Internet ExplorerYes
Supported
frameSupported · deprecated
Bottom line: Fine for understanding old markup. Do not rely on frame for new designs — use CSS border properties.
Remember
Key Takeaways
Role: choose which outer sides of a table border are drawn.
Element:<table> only (not the obsolete frame tag).
Status: deprecated — use CSS border instead.
Related:border (width) and rules (inner lines).
One line: table frame picked outer border sides — replace it with CSS borders in new code.
Frequently Asked Questions
On a table, frame selects which sides of the outer border (the frame around the table) are drawn. Values include void, above, below, hsides, vsides, lhs, rhs, box, and border.
Yes. MDN lists it among deprecated table attributes. Prefer CSS border-style and border-width on the table instead.
No. The frame attribute belongs to table. The obsolete frame element lived inside frameset. Use iframe for modern embeds.
frame controls the outer border sides. rules controls internal lines between rows, columns, or groups.
Often yes for a visible effect in legacy markup. border sets the outer border width in pixels; frame chooses which sides show. CSS border is clearer for new pages.
No. Learn it to read old HTML. Style tables with CSS borders instead.