Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
47 views

HTML Iframe Javascript

An HTML iframe is used to display a web page within another web page. The <iframe> tag specifies an inline frame and is used to embed another document within the current HTML document. By default, an iframe has a border, but this can be removed by adding a style attribute and using the CSS border property. An iframe's height, width, and border can all be customized using CSS. An iframe can also be used as the target frame for a link by specifying its name attribute in the target attribute of the link.

Uploaded by

Aubrey Peña
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

HTML Iframe Javascript

An HTML iframe is used to display a web page within another web page. The <iframe> tag specifies an inline frame and is used to embed another document within the current HTML document. By default, an iframe has a border, but this can be removed by adding a style attribute and using the CSS border property. An iframe's height, width, and border can all be customized using CSS. An iframe can also be used as the target frame for a link by specifying its name attribute in the target attribute of the link.

Uploaded by

Aubrey Peña
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

HTML 

Iframes
HTML Iframes
An HTML iframe is used to display a web page within a
web page.

HTML Iframe Syntax


The HTML <iframe> tag specifies an inline frame.

An inline frame is used to embed another document within the current


HTML document.
HTML Iframe Syntax

Tip: It is a good practice to always include a title attribute for the <iframe>. This is used by screen readers to read out what the content of the iframe is.
Iframe - Set Height and Width
• Use the height and width attributes to specify the size of the iframe.

• The height and width are specified in pixels by default:

• Or you can add the style attribute and use the CSS height and width properties


Iframe - Remove the Border
• By default, an iframe has a border around it.

• To remove the border, add the style attribute and use the CSS border
property:
With CSS, you can also change the size, style and color of the iframe's border:
Iframe - Target for a Link
• 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:
HTML JavaScript
HTML JavaScript
• JavaScript makes HTML pages more dynamic and interactive.

• The HTML <script> Tag


• The HTML <script> tag is used to define a client-side script (JavaScript).
• The <script> element either contains script statements, or it points to an
external script file through the src attribute.
• Common uses for JavaScript are image manipulation, form validation, and
dynamic changes of content.
• To select an HTML element, JavaScript most often uses the
document.getElementById() method.
This JavaScript example writes "Hello JavaScript!" into an HTML element with id="demo":
A Taste of JavaScript
• Here are some examples of what JavaScript can do:

• Example
JavaScript can change content:
JavaScript can change styles:
JavaScript can change attributes:

You might also like