iFrame

An iFrame is an inline frame used inside a webpage to load another HTML document inside it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser.

WordPress users often come across iframes when they are trying to embed something from an external source into their WordPress site. The most common example of an iframe embed code is the YouTube video embed code which looks like this:

1
<iframe width="420" height="315" src="//www.youtube.com/embed/qzOOy1tWBCg?rel=0" frameborder="0" allowfullscreen></iframe>

In the above example, the iframe tag loads YouTube’s video player with the video ID provided in the code. It has other parameters defined as well, such as height, width, frameborder, etc. These parameters will be used by the script which loads YouTube video player.

Many other third party websites may provide users with an iframe embed code to insert certain elements on their websites. Most commonly web analytics service providers, social media websites, and video sharing sites offer users embed code in iframe format.

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.