Miscellaneous Learning 151_MiscLearning.html

Complete HTML Reference is fairly extensive. <iframe> is described rather meagerly here.

The <iframe> tag specifies an inline frame.

An inline frame is used to embed another document withing the current HTML document.

A number of attributes is no longer supported in HTML5:

  1. align
  2. frameborder
  3. longdesc
  4. marginheight
  5. marginwidth
  6. scrolling

Attributes supported in HTML5 for iframe
AttributeValueDescription
heightpixelSpecifies the height of an <iframe>
nametextSpecifies the name of an <iframe>
sandboxallow-forms allow-pointer-lock
allow-popups
allow-same-origin
allow-scripts
allow-top-navigation
Enables an extra set of restrictions for the content in an <iframe>
srcHTML_codeSpecifies the HTML content of the page to show in the <iframe>
widthpixelSpecifies the width of an <iframe>

Examples

The src 'https://www.w3schools.com/html/html_iframe.asp' refused display. However, my file, '149B_Misc&div.html', displayed well. The surprise lies in seeing scrollbars. Scrollbars are necessary to see the whole page. The scrollbars are provided automatically.

Note: image style adjacent display did not work. I had to use <div>.

By default, an iframe has a border around it. To remove the border, add style = "border: none;".

With CSS, you can also change the size, style and color of the iframe's border:

Example <iframe src = "demo_iframe.htm" style = "border:2px solid red;"></iframe> is in code format.















An iframe can be used as the target frame for a link.

The target attribute of the link must refer to the name attribute of the iframe:

Example:

<iframe src = "demo_iframe.htm" name = "iframe_a"></iframe>



<p><a href = "https://www.w3schools.com" target = "iframe_a">W3Schools.com</a></p>
www.w3schools.com refused to connect.

flags    song   

Although, the example uses html file for the iframe source, I tried to use song without controls and it works. Note the first iframe tag assigns a file to the iframe and assigns a name. The second <p> statement is a normal reference, but with the addition of a target, where the name of the target is the name given in the <iframe>line.

Video and audio content per Apr 10,2019

HTML Updated 04/30/19

The video element

After a period of 3 frustrating hours to get HTML5 video work I give up. It did not work either in Chrome of Firefox.

Many complained on the internet.

< Check out iframe >