1.仕様
FRAMESET要素は、
ウィンドウのビューの
レイアウトを指定します。
FRAMESET - - ((FRAMESET
- frameset
-
ウィンドウの分割 (window subdivision)
HTML4.01 Frameset で扱われた、HTML5 で廃止の要素です。
以下の説明では、HTML Living Standard での解釈を想定して記述しています。 - 種類
-
通常要素
- カテゴリ
-
なし
- 使用できるコンテキスト
-
- <html>
要素 の 2番目 - <frameset>
要素 に 0個以上
<html>
要素 の 2番目のコンテンツとして、使用できます。
<frameset>要素 に 0個以上を そのコンテンツとして、使用できます。ただしこれは、HTML4.01 Frameset の場合に限ります。
- <html>
- コンテンツモデル
-
(FRAMESETまたは1つ以上のframe)と、0または1つの<noframes>
要素 (FRAMESETまたは1つ以上のframe)と、0または1つの<noframes>
要素 が配置できます。 - タグの省略
-
どちらのタグも省略できません。
- DOM インターフェイス
-
HTMLFrameSetElement
[Exposed=Window]
interface HTMLFrameSetElement : HTMLElement {
lastReviewed;
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString cols;
[CEReactions] attribute DOMString rows;
};
HTMLFrameSetElement includes WindowEventHandlers;
HTMLElement
[Exposed=Window]
interface HTMLElement : Element {
[HTMLConstructor] constructor();
// metadata attributes
[CEReactions] attribute DOMString title;
[CEReactions] attribute DOMString lang;
[CEReactions] attribute boolean translate;
[CEReactions] attribute DOMString dir;
// user interaction
[CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden;
[CEReactions] attribute DOMString inert;
undefined click();
[CEReactions] attribute DOMString accessKey;
readonly attribute DOMString accessKeyLabel;
[CEReactions] attribute boolean draggable;
[CEReactions] attribute boolean spellcheck;
[CEReactions] attribute DOMString writingSuggestions;
[CEReactions] attribute DOMString autocapitalize;
[CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
[CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText;
ElementInternals attachInternals();
// The popover API
undefined showPopover();
undefined hidePopover();
boolean togglePopover(optional boolean force);
[CEReactions] attribute DOMString? popover;
};
HTMLElement includes GlobalEventHandlers;
HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement;
Element
[Exposed=Window]
interface Element : Node {
readonly attribute DOMString? namespaceURI;
readonly attribute DOMString? prefix;
readonly attribute DOMString localName;
readonly attribute DOMString tagName;
[CEReactions] attribute DOMString id;
[CEReactions] attribute DOMString className;
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
[CEReactions, Unscopable] attribute DOMString slot;
boolean hasAttributes();
[SameObject] readonly attribute NamedNodeMap attributes;
sequence<DOMString> getAttributeNames();
DOMString? getAttribute(DOMString qualifiedName);
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
[CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
[CEReactions] undefined removeAttribute(DOMString qualifiedName);
[CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName);
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
boolean hasAttribute(DOMString qualifiedName);
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
Attr? getAttributeNode(DOMString qualifiedName);
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
[CEReactions] Attr? setAttributeNode(Attr attr);
[CEReactions] Attr? setAttributeNodeNS(Attr attr);
[CEReactions] Attr removeAttributeNode(Attr attr);
ShadowRoot attachShadow(ShadowRootInit init);
readonly attribute ShadowRoot? shadowRoot;
Element? closest(DOMString selectors);
boolean matches(DOMString selectors);
boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches
HTMLCollection getElementsByTagName(DOMString qualifiedName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
undefined insertAdjacentText(DOMString where, DOMString data); // legacy
};
GlobalEventHandlers
interface mixin GlobalEventHandlers {
attribute EventHandler onabort;
attribute EventHandler onauxclick;
attribute EventHandler onbeforeinput;
attribute EventHandler onbeforematch;
attribute EventHandler onbeforetoggle;
attribute EventHandler onblur;
attribute EventHandler oncancel;
attribute EventHandler oncanplay;
attribute EventHandler oncanplaythrough;
attribute EventHandler onchange;
attribute EventHandler onclick;
attribute EventHandler onclose;
attribute EventHandler oncontextlost;
attribute EventHandler oncontextmenu;
attribute EventHandler oncontextrestored;
attribute EventHandler oncopy;
attribute EventHandler oncuechange;
attribute EventHandler oncut;
attribute EventHandler ondblclick;
attribute EventHandler ondrag;
attribute EventHandler ondragend;
attribute EventHandler ondragenter;
attribute EventHandler ondragleave;
attribute EventHandler ondragover;
attribute EventHandler ondragstart;
attribute EventHandler ondrop;
attribute EventHandler ondurationchange;
attribute EventHandler onemptied;
attribute EventHandler onended;
attribute OnErrorEventHandler onerror;
attribute EventHandler onfocus;
attribute EventHandler onformdata;
attribute EventHandler oninput;
attribute EventHandler oninvalid;
attribute EventHandler onkeydown;
attribute EventHandler onkeypress;
attribute EventHandler onkeyup;
attribute EventHandler onload;
attribute EventHandler onloadeddata;
attribute EventHandler onloadedmetadata;
attribute EventHandler onloadstart;
attribute EventHandler onmousedown;
[LegacyLenientThis] attribute EventHandler onmouseenter;
[LegacyLenientThis] attribute EventHandler onmouseleave;
attribute EventHandler onmousemove;
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
attribute EventHandler onmouseup;
attribute EventHandler onpaste;
attribute EventHandler onpause;
attribute EventHandler onplay;
attribute EventHandler onplaying;
attribute EventHandler onprogress;
attribute EventHandler onratechange;
attribute EventHandler onreset;
attribute EventHandler onresize;
attribute EventHandler onscroll;
attribute EventHandler onscrollend;
attribute EventHandler onsecuritypolicyviolation;
attribute EventHandler onseeked;
attribute EventHandler onseeking;
attribute EventHandler onselect;
attribute EventHandler onslotchange;
attribute EventHandler onstalled;
attribute EventHandler onsubmit;
attribute EventHandler onsuspend;
attribute EventHandler ontimeupdate;
attribute EventHandler ontoggle;
attribute EventHandler onvolumechange;
attribute EventHandler onwaiting;
attribute EventHandler onwebkitanimationend;
attribute EventHandler onwebkitanimationiteration;
attribute EventHandler onwebkitanimationstart;
attribute EventHandler onwebkittransitionend;
attribute EventHandler onwheel;
};
ElementContentEditable
interface mixin ElementContentEditable {
[CEReactions] attribute DOMString contentEditable;
[CEReactions] attribute DOMString enterKeyHint;
readonly attribute boolean isContentEditable;
[CEReactions] attribute DOMString inputMode;
};
HTMLOrSVGElement
interface mixin HTMLOrSVGElement {
[SameObject] readonly attribute DOMStringMap dataset;
attribute DOMString nonce; // intentionally no [CEReactions]
[CEReactions] attribute boolean autofocus;
[CEReactions] attribute long tabIndex;
undefined focus(optional FocusOptions options = {});
undefined blur();
};
WindowEventHandlers
interface mixin WindowEventHandlers {
attribute EventHandler onafterprint;
attribute EventHandler onbeforeprint;
attribute OnBeforeUnloadEventHandler onbeforeunload;
attribute EventHandler onhashchange;
attribute EventHandler onlanguagechange;
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onpagehide;
attribute EventHandler onpagereveal;
attribute EventHandler onpageshow;
attribute EventHandler onpageswap;
attribute EventHandler onpopstate;
attribute EventHandler onrejectionhandled;
attribute EventHandler onstorage;
attribute EventHandler onunhandledrejection;
attribute EventHandler onunload;
};
- ARIA in HTML
-
この要素は、HTML5 では廃止された機能です。ARIA in HTML に、この要素の記述はありません。
- レンダリング
- ブロック
ボックス フレーム
frameset {
display: block;
}
CSS を大雑把に読むと、 ブロックレベルのブロックコンテナボックス(ブロックボックス)を生成します。 などになります。
- 説明
-
frameset
要素 は、ウィンドウのレイアウトを矩形の部分空間で表します。HTML5 では廃止された要素です。<iframe>
要素 とスタイルシートを用いて代用できます。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org
/TR /html4 /frameset.dtd"> <html lang=
"ja"> <head>
<meta http-equiv=
"Content-Type" content= "text/html; charset=UTF-8"> <title>
frameset要素の例 - (Example of frameset element) | 離珠のHTMLでしぃ!</title> <meta name=
"author" content= "コータン (KOUTAN)"> <link rel=
"icon" href= "../favicon.ico" type= "image/vnd.microsoft.icon"> </head>
<frameset cols=
"30%,*"> <frame src=
"./exframe01.htm"> <frameset rows=
"35%,*"> <frame src=
"./exframe02.htm"> <frame src=
"./exframe03.htm"> </frameset>
<noframes>
<body>
<h1>
frameset要素の例</h1> <p>
この例の frameset要素は、ウィンドウのレイアウトを表しています。</p> </body>
</noframes>
</frameset>
</html>
このサンプルへのリンクです。
(./exframeset.htm) - 参照元
-
参照元
- HTML Living Standard. 16.2 Non-conforming features (最終更新日 2025年8月5日)
- HTML Living Standard. 16.3.2 Frames (最終更新日 2025年8月5日)
- HTML Living Standard. 15 Rendering 15.6 Frames and framesets (最終更新日 2025年8月5日)
- HTML 5.3 W3C 初公開ワーキングドラフト. 11.3.3 Frames (W3Cワーキングドラフト、2017年12月14日)
- HTML 5.3 W3C 初公開ワーキングドラフト. 10. Rendering 10.6. Frames and framesets (W3Cワーキングドラフト、2017年12月14日)
- HTML 5.2 W3C 勧告. 11.3.3 Frames (W3C勧告、2017年12月14日)
- HTML 5.2 W3C 勧告. 10. Rendering 10.6. Frames and framesets (W3C勧告、2017年12月14日)
- HTML 5.1 W3C 勧告. 11.3.3 Frames (W3C勧告、2016年11月1日)
- HTML 5.1 W3C 勧告. 10. Rendering 10.6. Frames and framesets (W3C勧告、2016年11月1日)
- HTML 5 W3C 勧告. 11.3.3 Frames (W3C勧告、2014年10月28日)
- HTML 5 W3C 勧告. 10.6. 10. Rendering Frames and framesets (W3C勧告、2014年10月28日)
- HTML 4.01 Specification. 16 Frames in HTML documents. 16.2.1 The FRAMESET element (W3C勧告1999年12月24日)
- <frameset> - HTML: ハイパーテキストマークアップ言語 | MDN
- JSONデータ
-
JSON形式での、データのイメージです。
{
"frameset": {
"group": "Page",
"element": "- - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision. (Normal elements.) [None] --",
"attlist": {
"%Global;": "",
"rows": "%MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 row) --",
"cols": "%MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 col) --",
"onload": "%Script; #IMPLIED -- all the frames have been loaded --",
"onunload": "%Script; #IMPLIED -- all the frames have been removed --",
},
"summary": "ウィンドウの分割 (window subdivision)",
"point": "ウィンドウのレイアウトを矩形の部分空間で表します。",
"elementKind": "Normal",
"categories": "None",
"canUsedContexts": [
"HTML (HEAD,FRAMESET)",
"FRAMESET (FRAMESET)*",
],
"usedsupplement": "ただしこれは、HTML4.01 Frameset の場合に限ります。",
"contentModel": "FRAMESET (((FRAMESET|FRAME)+)&(NOFRAMES?))",
"tagOmission": [
"-",
"-",
],
"rendering": "Frame",
"domInterface": "HTMLFrameSetElement",
"contentAttributes": {
"rows": "この属性は水平フレームのレイアウトを指定します。これは、ピクセル, パーセント, 相対長さのカンマ区切りのリストです。デフォルト値は 100% で、これは 1 行を意味します。",
"cols": "この属性は垂直フレームのレイアウトを指定します。これは、ピクセル, パーセント, 相対長さのカンマ区切りのリストです。デフォルト値は 100% で、これは 1 列を意味します。",
},
"reference": [
{
"title": "HTML Living Standard. 16.2 Non-conforming features. Last Updated 5 August 2025",
"href": "https://html.spec.whatwg.org/multipage/obsolete.html#noframes",
"heading": "HTML Living Standard. 16.2 Non-conforming features",
"sub": "最終更新日 2025年8月5日",
},
{
"title": "HTML Living Standard. 16.3.2 Frames. Last Updated 5 August 2025",
"href": "https://html.spec.whatwg.org/multipage/obsolete.html#frames",
"heading": "HTML Living Standard. 16.3.2 Frames",
"sub": "最終更新日 2025年8月5日",
},
{
"title": "HTML Living Standard. 15 Rendering 15.6 Frames and framesets. Last Updated 5 August 2025",
"href": "https://html.spec.whatwg.org/multipage/rendering.html#frames-and-framesets",
"heading": "HTML Living Standard. 15 Rendering 15.6 Frames and framesets",
"sub": "最終更新日 2025年8月5日",
},
{
"title": "HTML 5.3 W3C Working Draft. 11.3.3 Frames. W3C First Public Working Draft, 14 December 2017",
"href": "https://www.w3.org/TR/2017/WD-html53-20171214/obsolete.html#frames",
"heading": "HTML 5.3 W3C 初公開ワーキングドラフト. 11.3.3 Frames",
"sub": "W3Cワーキングドラフト、2017年12月14日",
},
{
"title": "HTML 5.3 W3C Working Draft. 10. Rendering 10.6. Frames and framesets. W3C First Public Working Draft, 14 December 2017",
"href": "https://www.w3.org/TR/2017/WD-html53-20171214/rendering.html#frames-and-framesets",
"heading": "HTML 5.3 W3C 初公開ワーキングドラフト. 10. Rendering 10.6. Frames and framesets",
"sub": "W3Cワーキングドラフト、2017年12月14日",
},
{
"title": "HTML 5.2 W3C Recommendation. 11.3.3 Frames. W3C Recommendation, 14 December 2017.",
"href": "https://www.w3.org/TR/2017/REC-html52-20171214/obsolete.html#frames",
"heading": "HTML 5.2 W3C 勧告. 11.3.3 Frames",
"sub": "W3C勧告、2017年12月14日",
},
{
"title": "HTML 5.2 W3C Recommendation. 10. Rendering 10.6. Frames and framesets. W3C Recommendation, 14 December 2017.",
"href": "https://www.w3.org/TR/2017/REC-html52-20171214/rendering.html#frames-and-framesets",
"heading": "HTML 5.2 W3C 勧告. 10. Rendering 10.6. Frames and framesets",
"sub": "W3C勧告、2017年12月14日",
},
{
"title": "HTML 5.1 W3C Recommendation. 11.3.3 Frames. W3C Recommendation, 1 November 2016.",
"href": "https://www.w3.org/TR/2016/REC-html51-20161101/obsolete.html#frames",
"heading": "HTML 5.1 W3C 勧告. 11.3.3 Frames",
"sub": "W3C勧告、2016年11月1日",
},
{
"title": "HTML 5.1 W3C Recommendation. 10. Rendering 10.6. Frames and framesets. W3C Recommendation, 1 November 2016.",
"href": "https://www.w3.org/TR/2016/REC-html51-20161101/rendering.html#frames-and-framesets",
"heading": "HTML 5.1 W3C 勧告. 10. Rendering 10.6. Frames and framesets",
"sub": "W3C勧告、2016年11月1日",
},
{
"title": "HTML 5 W3C Recommendation. 11.3.3 Frames. W3C Recommendation, 28 October 2014.",
"href": "https://www.w3.org/TR/2014/REC-html5-20141028/obsolete.html#frames",
"heading": "HTML 5 W3C 勧告. 11.3.3 Frames",
"sub": "W3C勧告、2014年10月28日",
},
{
"title": "HTML 5 W3C Recommendation. 10. Rendering 10.6. Frames and framesets. W3C Recommendation, 28 October 2014.",
"href": "https://www.w3.org/TR/2014/REC-html5-20141028/rendering.html#frames-and-framesets",
"heading": "HTML 5 W3C 勧告. 10.6. 10. Rendering Frames and framesets",
"sub": "W3C勧告、2014年10月28日",
},
{
"title": "HTML 4.01 Specification. 16 Frames in HTML documents. 16.2.1 The FRAMESET element.",
"href": "https://www.w3.org/TR/html401/present/frames.html#edef-FRAMESET",
"heading": "HTML 4.01 Specification. 16 Frames in HTML documents. 16.2.1 The FRAMESET element",
"sub": "W3C勧告1999年12月24日",
},
{
"title": "MDN Web Docs. HTML <frameset>.",
"href": "https://developer.mozilla.org/ja/docs/Web/HTML/Element/frameset",
"heading": "<frameset> - HTML: ハイパーテキストマークアップ言語 | MDN",
},
],
"version": {
"first": "HTML4.01 Frameset",
"latest": "HTML4.01 Frameset",
},
"lastReviewed": "2025-08-10",
}
}
注意: 簡易に描画する為に、各項目の後ろに
,
を付与しています。JSON の形式では、末尾の項目の後には,
は付けません。 - 最終確認日
-
2025-08-10
2.使用できるコンテキスト
frameset要素は、
HTML4.01 Frameset の
html要素の
2番目の要素として
使用できます。
<frameset>
と言うより、文書型が HTML4.01 Frameset の HTML文書 でのみ使用できます。
標準的な文書には、1つの<head>
HTML5 では廃止された要素です。<iframe>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org
/TR /html4 /frameset.dtd"> <html lang=
"ja"> <head>
<meta charset=
"utf-8"> <title>
サンプル</title> </head>
<frameset cols=
"30%, *"> <frame src=
"./menu.htm"> <frameset rows=
"20%, *"> <frame src=
"./header.htm"> <frame src=
"./body.htm"> </frameset>
<noframes>
<body>
フレームに関しての、テキストデータの表示等の例示です。
</body>
</noframes>
</frameset>
</html>
HTML4.01 Frameset で<html>
3.コンテンツモデル
frameset要素は、
frameset要素,
frame要素,
noframes要素を
配置できます。
<frameset>
別の言い方で細かく言うと、<html>
<frameset>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org
/TR /html4 /frameset.dtd"> <html lang=
"ja"> <head>
<meta charset=
"utf-8"> <title>
サンプル</title> </head>
<frameset cols=
"30%, *"> <frame src=
"./menu.htm"> <frameset rows=
"20%, *"> <frame src=
"./header.htm"> <frame src=
"./body.htm"> </frameset>
<noframes>
<body>
フレームに関しての、テキストデータの表示等の例示です。
</body>
</noframes>
</frameset>
</html>
HTML4.01 Frameset で<frameset>
4.コンテンツ属性
frameset要素は、
グローバル属性と、
rows属性,
cols属性 を
配置できます。
rows属性
<frameset rows=
"35%, *" >
rows
cols属性
<frameset cols=
"30%, *" >
cols
5.DOM インターフェイス
documentの
プロパティである
bodyは、
frameset要素または
body要素を
返します。
<frameset>document
のプロパティであるbody
を用います。これは、要素である<body>
HTMLBodyElement インターフェイスは、HTMLElement インターフェイスを継承しつつ、WindowEventHandlers インターフェイスも追加しています。HTMLFrameSetElement インターフェイスは、HTMLElement インターフェイスを継承しつつ、WindowEventHandlers インターフェイスも追加していて、さらにcols IDL属性, rows IDL属性 が追加されています。
<frameset>body
からchildren
を用いて辿っていく方法もありますし、iddocument
の getElementById()メソッドで、要素を取得する方法もあります。
document
の querySelector()メソッド等を用いる事も考えられます。子結合子 (child combinator) (>) や :nth-child()疑似クラスを用いて、特定するのも良いかと思います。
ここで記述しているのは、<frameset>
6.アクセシビリティ
frameset要素は、
ARIA in HTML に、
記述はありません。
<frameset>
<frameset>
一応、グローバル
案としては、フレームの名前を意味として分かり易くするくらいでしょうか。<frame>
そもそも論として、<frameset>
7.レンダリング
frameset {
display: block;
}
<frameset>block
であり、ブロック
<frameset>
<frameset>
<frameset>
8.気を付ける点
frameset要素は、
HTML5 で
廃止されています。
<frameset>
<iframe>
<!DOCTYPE html>
<html lang=
"ja"> <head>
<meta charset=
"utf-8"> <title>
iframe要素での代用例</title> </head>
<body>
<div style=
"height: 100%; display: flex; flex-flow: row nowrap; align-items: stretch; justify-content: space-between;"> <iframe src=
"./exframe01.htm" style= "width: 30%; box-sizing: border-box;"> </iframe> <div style=
"flex: 1 1 auto; box-sizing: border-box; display: flex; flex-flow: column nowrap; align-items: stretch; justify-content: space-between;"> <iframe src=
"./exframe02.htm" style= "width: 100%; height: 35%; box-sizing: border-box;"> </iframe> <iframe src=
"./exframe03.htm" style= "width: 100%; flex: 1 1 auto; box-sizing: border-box;"> </iframe> </div>
</div>
</body>
</html>
<iframe>
この例示は書き換えを想定しているので、style