Night More

Revise Now

Cambridge AS levels

Physics Chemistry Computer Science

Programming and coding

Learn HTML Learn SEO


What do you want
to do?

Contact us Donate Support More Services Send a tweet Social media

more topic chapters

HTML Iframe Tags & Elements

The basic idea

An iframe is a very basic element of the HTML document. There purpose is very simple. Think of a website which you load using your broweser. What the iframe does is load another website with in a particular websites. Amazing! So the user can look at two websites at once but, keep in mind if iframes are used in the wrong way. Your website could crash or be infected with malware and even damage your Google SEO/ranking

We use the <iframe> element to create an inline frame

We will see an example to understand the use

The src attribute is to define the url or the location which the file is to be loaded from

You can style the iframes with CSS to define its height and width and it's border if you want

We will not run this because of many reasons but we will show what this iframe will do

Here what it looks like when our webpage have the same iframe element

The reason why we didn't run the iframe is because most of running systems are done using iframes

It is possible to have an iframe with in an iframe but this is known as bad practice and it could damage your Google SEO ranking

How iframes affect Google SEO

If iframes are used in a wrong way,it will badly affect your Google SEO ranking

Iframes are suitable for normal purposes such as loading up a webpage with in a your webpage - in this way iframes are highly beneficial and acceptable.

However, if there are iframes with in iframes, this will slow down or even crash your website

Another, point to rememeber is that you should never link your iframe to an unknown website as the unknown website could have malware which could ultimately destroy your website

If iframes are used in the normal way, there is no effect on the Google SEO. This is because Google thinks the iframes are not part of your original website so they just ignore it

However, if misused, it could damage your SEO and cause big problems

Iframes are very useful and provides amazing user interface so use it wisely

If you want any advice or more details on how to use iframes properly, Revise Zone is here to help! Go to our support section and contact us. We will help you!

Iframes are very useful but if the coder doesn;t know what he is doing, then first contact us!

The Target attribute

We did talk about the target attribute under links. The target attributes define the way which the webpage or link should be loaded

We will see now how you can open a link/url on an iframe

As you can see the name attribute is used to identify the iframe element.

The target attribute contains the iframe name value

It's very simple

I will give you a real code example:

Click one of these links and follow me now!

Revise Zone


Computer science

Some points to remember

Use iframes only when you need to. Don't fill your webpage with iframes because it will slow doewn your webpage and affect your Google SEO ranking

Protect your websitefrom being iframed! It means block your website from being iframed by other websites, especially if your website handles online transactions. We will discuss this more later

Never link an iframe to an unknown website

Iframes can cause back button problems in Google chrome. Make sure you have a good website which has many links to go back and forth

Revisezone.com Copyright 2020 Developers & Coding section