Page 117 - Plus_V2.2_C8_Flipbook
P. 117

FRAMES


                 HTML frames are used to divide the web browser window into multiple sections where each section
                 can be loaded separately.

                      <IFRAME> Tag

                 In HTML5, <IFRAME> tag is used to create a frame. This tag embeds a frame directly inline with the
                 other elements of a web page. <IFRAME> tag specifies an inline frame, which is used to embed another
                 web page within the current HTML web page. IFRAME stands for Inline Frame.


                      Attributes of IFrame Tag

                 The syntax to us the <IFRAME> tag is as follows:
                 <IFRAME SRC="URL" HEIGHT="value in px or %" WIDTH="value in px or %">

                 The important attributes of <IFRAME> tag are:
                    SRC: This attribute specifies the address of the document to embed in the <IFRAME>.
                    HEIGHT and WIDTH: The HEIGHT and WIDTH attributes are used to specify the height and width
                   of a frame, respectively. You can specify the height and width of a frame either in pixels (px) or in
                   percentages (%). The default width is 300 pixels and default height is 150 pixels. While giving values

                   in percentages, the height and width of a frame range between 1% to 100%. For example,
                   <IFRAME SRC="COFFEE.html" WIDTH=100% HEIGHT=300>

                    A width or height of 100% means that the frame will take up the entire width or height of its containing
                   element.
                    NAME: The NAME attribute specifies a name for an iframe. For example,

                   <IFRAME SRC="COFFEE.html" NAME="COFFEE_FRAME" WIDTH=100% HEIGHT=300></IFRAME>


                      Adding Border to Frame

                 Borders be created around frames using the ‘border’ value in the style attribute of <IFRAME> tag.
                 For example,
                 <IFRAME SRC="COFFEE.html" STYLE=”BORDER:1PX SOLID BLACK;”>
                 The border property of CSS will add a border to the frame with black colour and thickness of 1 pixel.

                 The border property can be set with one, two, or three values. For example,
                 border: [border-width] [border-style] [border-color];
                    [border-width]: It specifies the width of the border. It can be set in pixels.

                   Where,
                    [border-style]: It specifies the style of the border, such as solid, dashed, dotted, double, etc.

                    [border-color]: It specifies the color of the border.






                                                                                 Links, Frames, and Forms in HTML5  115
   112   113   114   115   116   117   118   119   120   121   122