[13] [DFN[[[MHT]]]] は、[[HTML]] と関連ファイルを[[一纏め][HTMLのパッケージ化]]にした[[ファイル形式]]です。
[[電子メール]]で [[HTML]] を扱う方法である [[MHTML]] から派生したもので、
本形式も [DFN[[[MHTML]]]] と呼ぶことがよくあります。 「[[MHT]]」
はその [[Windows]] における[[拡張子]]です。

[16] [[Internet Explorer]] の[[UI]]では[DFN[[[Webアーカイブ]]]]と呼ばれています。

* 構文

[17] [[RFC 822]] 風の構文です。

[18] [CODE(MIME)@en[[[Content-Type:]]]] [[ヘッダー]]により
[CODE(MIME)@en[[[multipart/related]]]] が指定されており、
[CODE(MIME)@en[[[type]]]] [[引数]]は [CODE(MIME)@en[[[text/html]]]]
に設定されます。

[19] 他に [[RFC 822]] [[メッセージ]]の[[ヘッダー]] ([CODE(822)@en[[[From:]]]]、
[CODE(822)@en[[[Subject:]]]] など) が含まれることもあります
(が[[ヘッダー]]は必ずしも [[RFC 822]] やその後継仕様の構文に沿っているわけではありません)。

;; それらが[[レンダリング]]等に反映されるのかどうかは不明です。

[20] [[本体部分]]の1つ目は [CODE(MIME)@en[[[text/html]]]] になり、
その後に[[画像]]その他の[[本体部分]]が来ます。

[21] 各[[本体部分]]の [CODE(MIME)@en[[[Content-Location:]]]]
[[ヘッダー]]に元の[[絶対URL]]が含まれます。

;; [[HTML]] から参照する [[URL]] は、外部ではなく、適当な[[本体部分]]を参照するものと解釈されます。

;; [[MHTML]] も参照。

*歴史

- [1] ''mht←→html 変換'' <http://pc2.2ch.net/test/read.cgi/tech/1064476052/>

[2]
''MHT Generator - gir-lab Wiki'' <http://www.gir-lab.com/pukiwiki/pukiwiki.php?MHT%20Generator>
([[名無しさん]] [WEAK[2004-08-31 06:57:54 +00:00]])

[3]
[CITE[CalcArk MHTMLコンバータプラグイン]] <http://www.justsystem.co.jp/ark/p_download/c_MHTMLConverter.html>
([[名無しさん]] [sage])


[4]
[CITE[MHTML作成ツール]] <http://andyou.sakura.ne.jp/tool/MhtMaker.html>

[5] [[MHT in the wild]]


[6] [CITE[Issue 9965069: MHTML loading fix - Code Review]]
([TIME[2015-05-07 22:25:35 +09:00]] 版)
<https://chromiumcodereview.appspot.com/9965069/>

[7] [CITE[Issue 126955 - chromium - Chrome can't open MHTML file directly - An open-source project to help move the web forward. - Google Project Hosting]]
([TIME[2015-05-07 22:26:11 +09:00]] 版)
<https://code.google.com/p/chromium/issues/detail?id=126955>

[8] [CITE[Issue 125477 - chromium - Generated MHTML not recognized by IE - An open-source project to help move the web forward. - Google Project Hosting]]
([TIME[2015-05-07 22:28:39 +09:00]] 版)
<https://code.google.com/p/chromium/issues/detail?id=125477>

[9] [CITE@en[Bug 86540 – MHTML files should be loadable from all schemes considered local, not just file:]]
([TIME[2015-05-07 22:31:17 +09:00]] 版)
<https://bugs.webkit.org/show_bug.cgi?id=86540>

[10] [CITE@en[82118 – Tracking bug for Saving/Sending/Viewing HTML pages (e.g., as a single file, MHTML)]]
([TIME[2015-05-07 23:03:38 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=82118>

[11] [CITE@en[18764 – Full rfc2557 MHTML multipart/related support in BROWSER]]
([TIME[2015-05-07 23:04:27 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=18764>

[12] [CITE@en[40873 – Save as rfc 2557 MHTML; complete webpage in one file]]
([TIME[2015-05-07 23:04:48 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=40873>

[14] [CITE[Mht File Maker for Email - free PHP Archive email mht mime Script]]
( ([TIME[2014-09-12 02:02:53 +09:00]] 版))
<http://www.phpkode.com/scripts/item/mht-file-maker/>

[15] [CITE[phpでmhtファイルを生成するには? - Qiita]]
( ([TIME[2014-09-12 02:03:06 +09:00]] 版))
<http://qiita.com/zarchis/items/b3d402bf34910abdf012>

[22] [CITE@en[Update desktop.template (Linux) to include MHTML support by gjvnq · Pull Request #65 · chromium/chromium · GitHub]], [TIME[2021-12-09T01:47:43.000Z]] <https://github.com/chromium/chromium/pull/65/files>