Html-frame-tag

提供:Dev Guides
移動先:案内検索

HTML-<frame>タグ

説明

HTML <frame>タグは、framesetタグ内の各フレームを指定するために使用されます。 このタグはHTML5でサポートされていません

<!DOCTYPE html>
<html>

   <head>
      <title>HTML frame Tag</title>
   </head>

   <frameset cols = "200, *">
      <frame src = "/html/menu" name = "menu_page"/>
      <frame src = "/html/main" name = "main_page"/>

      <noframes>
         <body>
            Your browser does not support frames.
         </body>
      </noframes>

   </frameset>

</html>

これにより、次の結果が生成されます。以下の画像を参照してください。 左のフレームはメニューで、右のフレームはメインです-

特定の属性

HTML <frame>タグは、次の追加属性もサポートしています-

Attribute Value Description
frameborder 0 or 1 Specifies whether or not to display border around the frame.
marginheight pixels Allows you to specify the width of the space between the left and right of the frame’s borders and the frame’s content. The value is given in pixels. For example marginwidth = "10".
marginwidth pixels Specifies the margin, in pixels, between the frame’s contents and it’s left and right margins.
name frame name Name of the frame.
noresize noresize When set to noresize the user cannot resize the frame.
scrolling yesnoauto Determines scrollbar action.
src URL Location of the frame contents file.

サポートされているブラウザ

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes