1.仕様
FRAMESET要素
は、
ウィンドウのビューの
レイアウトを指定します。
- frameset
-
ウィンドウの分割 (window subdivision)
HTML4.01 Frameset で扱われた、HTML5 で廃止の要素です。
- 種類
-
通常要素
- カテゴリ
-
なし
- 使用できるコンテキスト
-
- html
要素 の 2番目 - frameset
要素 に 0個以上
html
要素 の 2番目のコンテンツとして、使用できます。
frameset要素 に 0個以上を そのコンテンツとして、使用できます。ただしこれは、HTML4.01 Frameset の場合に限ります。
- html
- コンテンツモデル
-
frameset
要素 またはframe要素 と、0または1つのnoframes要素 frameset
要素 またはframe要素 と、0または1つのnoframes要素 が配置できます。 - タグの省略
-
どちらのタグも省略できません。
- DOM インターフェイス
-
HTMLFrameSetElement
[Exposed=Window]
interface HTMLFrameSetElement : HTMLElement {
[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>
</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, ./exframe01.htm, ./exframe02.htm, ./exframe03.htm) - 参照元
-
参照元
- HTML Living Standard. 16.2 Non-conforming features (Last Updated 27 August 2024)
- HTML Living Standard. 16.3.2 Frames (Last Updated 27 August 2024)
- HTML Living Standard. 15 Rendering 15.6 Frames and framesets (Last Updated 19 July 2024)
- HTML 5.2 W3C 勧告. 11.3.3 Frames (W3C勧告、2017年12月14日)
- HTML 5.2 W3C 勧告. 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.6. Frames and framesets (W3C勧告、2016年11月1日)
- HTML 5 W3C 勧告. 11.3.3 Frames (W3C勧告、2014年10月28日)
- HTML 5 W3C 勧告. 10.6. 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": {
"check": "2024-09-01",
"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 --",
},
"comment": "ウィンドウの分割 (window subdivision)",
"point": "ウィンドウのレイアウトを矩形の部分空間で表します。",
"kind": "Normal",
"categories": "None",
"used": [
"HTML (HEAD,FRAMESET)",
"FRAMESET (FRAMESET)*",
],
"usedsupplement": "ただしこれは、HTML4.01 Frameset の場合に限ります。",
"contentmodel": "FRAMESET ((FRAMESET|FRAME)+&(NOFRAMES)?)",
"tag": [
"-",
"-",
],
"attributes": {
"rows": "この属性は水平フレームのレイアウトを指定します。これは、ピクセル, パーセント, 相対長さのカンマ区切りのリストです。デフォルト値は 100% で、これは 1 行を意味します。",
"cols": "この属性は垂直フレームのレイアウトを指定します。これは、ピクセル, パーセント, 相対長さのカンマ区切りのリストです。デフォルト値は 100% で、これは 1 列を意味します。",
},
"dominterface": "HTMLFrameSetElement",
"rendering": "Frame",
"reference": [
{
"title": "HTML Living Standard. 16.2 Non-conforming features.",
"href": "https://html.spec.whatwg.org/multipage/obsolete.html#noframes",
"heading": "HTML Living Standard. 16.2 Non-conforming features",
"sub": "Last Updated 27 August 2024",
},
{
"title": "HTML Living Standard. 16.3.2 Frames.",
"href": "https://html.spec.whatwg.org/multipage/obsolete.html#frames",
"heading": "HTML Living Standard. 16.3.2 Frames",
"sub": "Last Updated 27 August 2024",
},
{
"title": "HTML Living Standard. 15 Rendering 15.6 Frames and framesets.",
"href": "https://html.spec.whatwg.org/multipage/rendering.html#frames-and-framesets",
"heading": "HTML Living Standard. 15 Rendering 15.6 Frames and framesets",
"sub": "Last Updated 19 July 2024",
},
{
"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.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.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.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.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.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. 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",
},
}
}
注意: 簡易に描画する為に、各項目の後ろに
,
を付与しています。JSON の形式では、末尾の項目の後には,
は付けません。 - 最終確認日
-
2024-09-01
2.使用できるコンテキスト
frameset要素
は、
HTML4.01 Frameset の
html要素の
2番目の要素として
使用できます。
<!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>サンプル</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 http-equiv=
"Content-Type" content= "text/html; 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は、
body要素または
frameset要素を
返します。
framesetdocument
のプロパティであるbody
を用います。これは、要素であるbody
framesetbody
からchildren
を用いて辿っていく方法もありますし、iddocument
の getElementById()メソッドで、要素を取得する方法もあります。
6.レンダリング
frameset {
display: block;
}
framesetblock
であり、ブロック
frameset
frameset
frameset
7.気を付ける点
HTML5 で
廃止されています。
frameset
iframe
<!DOCTYPE html>
<html lang=
"ja"> <head>
<meta charset=
"UTF-8"> <title>離珠のHTMLでしぃ!</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;"> <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 src=
"./exframe03.htm" style= "width: 100%; flex: 1 1 auto; box-sizing: border-box;"> </div>
</div>
</body>
</html>
iframe
この例示は書き換えを想定しているので、style