Languages
[Edit]
EN

HTML - embed site into site (iframe)

0 points
Created by:
Isaiah89
361

In this article, we would like to show you how to embed a site into a site using HTML​​​​​​.

Quick solution:

<iframe src="url" title="example-title"></iframe>

 

Practical example

In this section, we create an example iframe that embeds our Findings & News site.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <iframe src="https://dirask.com/findings" height="250" width="100%" title="Dirask Findings"></iframe>
</body>
</html>

An alternative solution to set the iframe's size is to use style="height:200px;width:100%;". With this approach you can also style the iframe.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <iframe src="https://dirask.com/findings"
		style="height:250px; width:90%; box-shadow:10px 10px 8px #888888; border:none;"
		title="Dirask Findings"></iframe>
</body>
</html>

References

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join