HTML

Adam Duffy
Adam Duffy
4,051 Points

Is <iframe> Invalid?

I want to embed a map from google to display the location of the shop to the clients but I heard iframe is no longer valid.

Is it true? What other alternatives are available?

1 Answer

Eric Butler
Eric Butler
31,934 Points

Hi Adam, many many websites, including very reputable ones, still use iframes for certain situations. In fact, to get a Google map on your website, the code Google themselves recommend in their Share > Embed a Map widget is an iframe. So don't think you "shouldn't" use iframes, they're perfectly fine.

One thing that's tricky about iframes is that they can be tricky to size correctly on responsive websites, because their container (the "frame") does not adjust to the content inside it. There are ways to get around that too.