Web development, coding & SEO


IFRAME code

Uses of IFRAME code

  1. Web page inside a web page.
  2. IFRAME code enables include AdSense script without using any server side scripting.
  3. Put the slow loading javascript in an iframe and your page will load and the slow javascript can catch up later.
  4. IFRAME code enables to include an isolated fragment to a page, like to avoid crossinterfering of different style sheets. Sample of including iframe code.
  5. The page doctype has to be Transitional. Strict does not allow iframes.

Including an iframe code

<iframe frameborder="0" height="280" marginheight="0" marginwidth ="0" scrolling="no" src="../ads/google-adsense-336x280.html" width="336">
	<p>
		Your browser has to support iframes to see thousands and thousands of house share postings with pictures here.
	</p>
</iframe>

Sample of IFRAME file

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Google Adsense</title>
<base target="_parent">
</head>
<body>

<script type="text/javascript"><!--
google_ad_client = "pub-1234567890123456";
/* share-house-ads */
google_ad_slot = "1234567890";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</body>
</html>

2009