DEV Community

Emmanuel C. Ngowi
Emmanuel C. Ngowi

Posted on

Adding map to your web content

Hello friends, today I tried to create a map inside a webpage. I read some nuggets from stack overflow for inspirations but unfortunately for me I couldn't find any, (so I decided to dive in a head first in a book written by Jon Duckett) and after a quick read I got my AHA! moment and Voila! I opened my online code editor (codepen) and decided to create an iframe element.

Let's see what's Iframe element (HTML5 Element)

Let's assume you're creating a restaurant website and you have placed all required elements, as well as attributes and the site is lovely and responsive even to people's who need to use screen readers software to access the contents of that site. But you might need to place a map inside your site so that your customers won't be asking the same question, ("where's your restaurant located?") over and over again.
Therefore iframe element will assist you in putting another webpage inside of your webpage (For instance, based on our example there: iframe element will help you to put a google map inside your restaurant website)

Iframe element must include:

  1. (src) attribute 2.(height) attribute and
  2. (width) attribute

Hope I explained in a simplest way possible, be safe and please enjoy your day.

Top comments (0)