Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How are iframes used in html?

Tags:

html

iframe

What is an iframe, and how is it used in html?

like image 734
Mubeen Avatar asked Jun 05 '10 09:06

Mubeen


People also ask

Are iframes still used in HTML?

iFrames are an HTML tag and have been around for absolutely ages having been introduced back in 1997. Despite their age, they are still commonly used and are supported by all modern browsers.

Where do you put iframe in HTML?

Complete HTML/CSS Course 2022 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.

Are iframes still used in 2021?

<iframe> is just one of the component that the developer used to preprocess and send the data to the server. Probably the developer use it to display data or other elements too, but if this is the original intention, this is getting less and less common now and should be avoided due to security issues.


1 Answers

An iframe is an object that allows you to embed external content in your HTML page. You can use it to display other web pages, documents (e.g. PDF) etc (although for complex media types you may want to try the object tag instead).

You can add an iframe to your page like so:

<iframe src ="externalContent.html" width="400" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

The p tag inside will display if iframes are not supported by the browser being used.

like image 89
GShenanigan Avatar answered Sep 30 '22 19:09

GShenanigan