Our blog post today is showing a simple use of Iframe tag. You can define a frame height and width and present a image, video or a website in it. In our code today we will use Iframe to show a website within the bounds of a frame. The <iframe> basically defines an inline frame.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//This part of the code shows the title of the page as”I-FRAME”
<h1>Example Of I-Frame</h1>
<iframe src="http://eduonix.com/blog" width="700px" height="400px" align="left">
//ending tag of <iframe>
We start by standard definition of the HTML page. The Head contains the title I-Frame. In the body we start by creating the iframe tag and in src which stands for source we place the url for eduonix. We define the width as 700 px and height as 400 px. Alignment is set to left. You can have it on center of right as well. We end the iframe tag, the body and the HTML. The output will be like the following