English 中文(简体)
HTML - Iframes
  • 时间:2024-09-17

HTML - Iframes


Previous Page Next Page  

You can define an inpne frame with HTML tag <iframe>. The <iframe> tag is not somehow related to <frameset> tag, instead, it can appear anywhere in your document. The <iframe> tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders. An inpne frame is used to embed another document within the current HTML document.

The src attribute is used to specify the URL of the document that occupies the inpne frame.

Example

Following is the example to show how to use the <iframe> −

<!DOCTYPE html>
<html>

   <head>
      <title>HTML Iframes</title>
   </head>
	
   <body>
      <p>Document content goes here...</p>
      
      <iframe src = "/html/menu.htm" width = "555" height = "200">
         Sorry your browser does not support inpne frames.
      </iframe>
      
      <p>Document content also go here...</p>
   </body>
	
</html>

This will produce the following result −