typemustmatch was a boolean attribute on <object>. The idea was: only use the resource if its HTTP Content-Type matched the element’s type attribute — a MIME “must match” check.
It never gained wide browser support, was dropped from the living HTML Standard (around 2019), and is listed as obsolete. Spec advice today: avoid embedding untrusted resources with <object> — do not rely on typemustmatch.
Deprecated / obsolete.
Do not use typemustmatch in new pages. Learn it only to recognize old markup and migrate to modern embeds.
Compare obsolete markup with the modern form. Prefer the modern snippet in real projects.
markup style
Study only — typemustmatch is non-conforming and unused by engines.
Snippet
<!-- obsolete — do not use -->
<object data="/video/count.mp4" type="video/mp4" typemustmatch>
Fallback content
</object>
Obsolete boolean present — browsers do not rely on this check.
Code
HTML Examples
Study snippets. Use Try It Yourself for a live editor. Prefer modern patterns in production.
Example 1 — Recognize Obsolete Markup
Old docs sometimes showed typemustmatch next to type. Do not copy this into new work.
HTML
<!-- Obsolete — for study only -->
<object
data="/video/count.mp4"
type="video/mp4"
typemustmatch
width="400"
height="225">
<p>Your browser cannot display this object.
<a href="/video/count.mp4">Download the video</a>.
</p>
</object>
type on object remains a content-type hint. typemustmatch was a separate boolean that never stuck.
security
Not a substitute for trust
Even historically, MIME matching was not enough. Do not embed untrusted URLs; use CSP and purpose-built elements.
support
Never Baseline
Lack of interoperable implementation is why the feature was removed from the standard and from MDN docs.
migrate
Search and delete
If legacy HTML still has typemustmatch, remove it. Behavior should not depend on it.
Compatibility
Browser Support
typemustmatch is an obsolete HTML attribute on <object>. It was never widely implemented and is non-conforming for authors.
✓ Obsolete · Do not use
typemustmatch
Removed from the living HTML Standard. Do not expect engines to enforce MIME matching via this attribute. Prefer trusted embeds and modern elements.
0%Author use (do not)
Google ChromeNo usable support
Do not use
Mozilla FirefoxNo usable support
Do not use
Apple SafariNo usable support
Do not use
Microsoft EdgeNo usable support
Do not use
OperaNo usable support
Do not use
Samsung InternetNo usable support
Do not use
Internet ExplorerNo usable support
Do not use
typemustmatchObsolete
Bottom line: Study only. Delete typemustmatch from legacy pages; use object data/type carefully, or switch to video, img, iframe, or embed.
Remember
Key Takeaways
Status: obsolete — authors must not use it.
Old idea: force MIME of the resource to match type.
Keep:data + type on trusted object embeds.
Prefer:video, img, iframe, embed when they fit.
One line:typemustmatch was an unused MIME-guard on <object> — obsolete; delete it and embed only trusted resources with modern elements.
Frequently Asked Questions
A boolean attribute on <object> that was meant to require the resource’s Content-Type to match the type attribute before the object was used. It is obsolete and must not be used in new pages.
No. The WHATWG HTML Standard lists it as obsolete. It never got wide browser support and was removed from the living standard around 2019.
Use object with data and type only when you need object. Prefer modern embeds (img, video, iframe, embed) for common media. For untrusted content, do not rely on typemustmatch — avoid embedding untrusted resources.
No. type on object is still a valid MIME hint for the resource. typemustmatch was a separate boolean that tried to enforce a strict match — and is gone from the standard.
Do not depend on it. It was never implemented across browsers. Treat it as a historical footnote when reading old markup.
It is obsolete / non-conforming. Authors must not use it. MDN no longer documents it as a supported feature.