Page 82 - CodePilot V5.0 C8
P. 82

Code      Write the HTML code to present the given web page using the <IFRAME> tag to embed
                       1       two web pages in one web page.


                  <!DOCTYPE HTML>

                  <HTML>
                  <HEAD>

                  <TITLE>Using Frames in HTML

                  </TITLE>
                  <STYLE>

                  BODY {BACKGROUND-COLOR: #E0F7FA;}

                  H2 {TEXT-ALIGN: CENTER;
                  COLOR: #333; FONT-SIZE: 32PX;}

                  IFRAME{BACKGROUND-COLOR: #FFFFFF;}
                  </STYLE>

                  </HEAD>
                  <BODY>

                  <H2>Displaying Two Web pages Using Iframes</H2>

                  <IFRAME  HEIGHT="350PX"  WIDTH="300PX" SRC="Artificial_Intelligence.
                  html" NAME="Click Here Image"></IFRAME>
                  <IFRAME HEIGHT="350PX" WIDTH="300PX" SRC="Robotics.html" NAME="Rendering
                  a Robotic Arm"> </IFRAME>

                  </BODY>

                  </HTML>
                                                                                     The <FRAME> tag was used in
                  To run the preceding  HTML  code  successfully,  you  will          HTML 4 to create frames. It is
                  need two additional HTML files that the inline frames will           now deprecated in HTML5,
                  load. These files are specified by the SRC attributes in the        so you should avoid using it.
                  <IFRAME> tags.

                  Artificial_Intelligence.html: This is the file that will be loaded into the first inline frame.

                  Robotics.html: This is the file that will be loaded into the second inline frame.
                  If the URL in the <IFRAME> tag is incorrect or the file is not present in the same folder as the HTML
                  file, the frame will not work on the web page.


                  IFRAME TARGET FOR A LINK

                  Similar to setting the target for a hyperlink to open in a new window, you can also set the target
                  for a link in a frame. Your specified TARGET attribute of the link must refer to the NAME attribute
                  of the IFRAME.



                   80
                        CodePilot (V5.0)-VIII
   77   78   79   80   81   82   83   84   85   86   87