Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • jQuery
  • AngularJS
  • ReactJS
  • Next.js
  • React Native
  • NodeJS
  • Express.js
  • MongoDB
  • MERN Stack
  • PHP
  • WordPress
  • Bootstrap
  • Tailwind
  • CSS Frameworks
  • JS Frameworks
  • Web Development
Open In App
Next Article:
Design an About us Page using HTML and CSS
Next article icon

Design a Contact Page with a Map using HTML and CSS

Last Updated : 26 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article, we will design a Contact Page with a Map using HTML and CSS. The Contact Page with the Map is useful and provides users with geographical context for finding your organization or the location more efficiently. Here, we will create the basic contact form for the user to fill out and the location of the organization that we want to display.

Preview

contatmap

Approach

  • Set up a basic HTML structure with div elements for form and map, including labels, inputs, textarea, and a submit button.
  • Now use Flexbox for a clean layout, styling form elements with rounded corners, and applying a subtle box shadow.
  • Design the form labels using Font Awesome icons for a modern and intuitive user interface.
  • Now add a Google Map iframe within a dedicated div, adjusting dimensions and appearance.
  • Choose the best color scheme, ensuring a visually pleasing and better design.

Example: The below example illustrates the creation of the contact form with a Map embedded.

HTML
<!DOCTYPE html> <html lang="en">  <head>     <meta charset="UTF-8">     <meta name="viewport"            content="width=device-width,                    initial-scale=1.0">     <title>Feedback Form with map</title>     <link rel="stylesheet"            href="index.css">     <link rel="stylesheet"            href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"           integrity= "sha512-5A8nwdMOWrSz20fDsjczgUidUBR8liPYU+WymTZP1lmY9G6Oc7HlZv156XqnsgNUzTyMefFTcsFH/tnJE/+xBg=="           crossorigin="anonymous"           referrerpolicy="no-referrer" /> </head>  <body>     <div class="ffbox">         <div class="ffbox1">             <h1 class="gfg">GeeksforGeeks</h1>             <h2>Contact Us</h2>             <form>                 <label for="fullName">                     <i class="fa fa-solid fa-user"                         style="margin: 2px;">                     </i> Full Name:                 </label>                 <input type="text"                         id="fullName"                         name="fullName" required>                  <label for="email">                     <i class="fa fa-solid fa-envelope"                         style="margin: 2px;">                     </i>                     Email Address:                  </label>                 <input type="email"                        id="email"                         name="email" required>                  <label for="mobile">                     <i class=" fa fa-solid fa-phone"                         style="margin: 2px;">                     </i>                     Contact No:                 </label>                 <input type="tel"                        id="mobile"                         name="mobile" required>                  <label for="msg">                     <i class=" fa fa-solid fa-comment"                         style="margin: 2px;">                     </i>                     Write Message:                 </label>                 <textarea id="msg"                            name="msg"                            rows="5" required>                 </textarea>                  <button type="submit">                     Submit                 </button>             </form>         </div>         <div class="map-div">             <iframe src= "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3506.1602802684192!2d77.39638073968018!3d28.504825075835775!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x390ce626851f7009%3A0x621185133cfd1ad1!2sGeeksforGeeks%20%7C%20Coding%20Classes!5e0!3m2!1sen!2sin!4v1702963476861!5m2!1sen!2sin"                     width="370"                      height="95%"                      allowfullscreen=""                      loading="lazy"                     referrerpolicy="no-referrer-when-downgrade">             </iframe>         </div>     </div> </body>  </html> 
CSS
/* style.css */ @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');  body {     font-family: 'Poppins', sans-serif;     margin: 0;     padding: 0;     display: flex;     align-items: center;     justify-content: center;     min-height: 100vh;     background-image:         linear-gradient(120deg, #caeff2 0%, #a2c2ee 100%); }  .ffbox {     display: flex;     width: 80%;     max-width: 800px;     background-color: #fff;     border: 3px solid #e4e4e9;     box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);     overflow: hidden;     border-radius: 10px;     flex-wrap: wrap; }  .ffbox1 {     flex: 1;     padding: 20px;     box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); }  .ffbox1 label {     display: block;     margin-bottom: 8px; }  .ffbox1 input, .ffbox1 textarea {     width: 100%;     padding: 8px;     margin-bottom: 16px;     box-sizing: border-box;     border-radius: 15px;     background-color: #dcdce1;     border: none; }  .ffbox1 textarea {     resize: vertical; }  .ffbox1 {     margin-bottom: 16px; }  .ffbox1 label {     margin-right: 16px; }  .map-div {     flex: 1;     background-color: #eee; }  button {     width: 100%;     padding: 8px;     margin-bottom: 16px;     box-sizing: border-box;     border-radius: 15px;     background-color: rgb(105, 152, 111);     color: rgb(183, 213, 179);     font-size: 17px;     font-weight: 700;     border: #a2c2ee; }  button:hover {     background-color: rgb(52, 98, 58); }  .map-div iframe {     border: 0;     padding: 10px; }  .gfg {     text-align: center;     color: green; }  .map-div {     background-color: rgb(152, 178, 234); } 

Output:


Next Article
Design an About us Page using HTML and CSS

S

shivanigupta18rk
Improve
Article Tags :
  • Web Technologies
  • Web Templates

Similar Reads

  • Design a Contact us Page using HTML and CSS
    A Contact Us page is used to allow visitors to contact the website owner or administrator for various purposes, such as asking questions, giving feedback, requesting information, or reporting issues. In this article, we will see how to design a Contact Us page using HTML and CSS. Creating an attract
    4 min read
  • Design a Contact Page with a Map using Bootstrap
    We will design a Contact Page with a Map using Bootstrap. The Contact Page with the Map is useful and provides users with geographical context for finding your organization or the location more efficiently. Here, we will create the basic contact form for the user to fill out and the location of the
    2 min read
  • Design a Virtual Credit Card Template using HTML and CSS
    In this article, we will design a Virtual Credit Card template using HTML and CSS for a modern and interactive user experience. This design includes spaces for the card number, name, and expiry date. HTML will be used to structure the layout, while CSS will add styling for a visually pleasing and be
    3 min read
  • Design an About us Page using HTML and CSS
    An "About" page is a section on a website that gives you information about the people or company behind the site. It's a great way to get to know the people you're interacting with online and to learn more about their stories. ApproachFirst make the basic structure using HTML, it will include a head
    5 min read
  • Design a Wedding Theme based Page using HTML and CSS
    Designing a wedding-themed webpage is a fun way to capture the joy of this special day. In this article, we'll help you create a beautiful webpage using simple HTML and CSS. PreviewApproachFirslty, create a new file with the "index.html". Include Google Fonts, Font Awesome Icons, and external CSS li
    6 min read
  • Design a Overlap Block Page Template using HTML and CSS
    In this article, we will create an Overlap Block layout template using HTML & CSS. The Overlap Block Layout is a design concept where multiple elements or blocks on a webpage visually overlap with one another. This layout frequently uses CSS's z-index property to regulate the order in which item
    3 min read
  • Design a calendar using HTML and CSS
    In this article, we will create a calendar using HTML, and CSS. HTML is a standard for creating the structure of web pages and defining elements like headings, paragraphs, and links whereas CSS (Cascading Style Sheets) complements HTML by controlling the visual presentation, enabling styling and lay
    5 min read
  • Design a Tip Calculator using HTML, CSS and JavaScript
    The tip is the money given as a gift for good service, to the person who serves you in a restaurant. In this project, a simple tip calculator is made which takes the billing amount, type of service, and the number of persons as input. As per the three inputs, it generates a tip for the serving perso
    4 min read
  • Design a Tribute Page using HTML and CSS
    Making a tribute page is an Innovative way to honor someone special in your life. In this article, we create a tribute webpage using HTML and CSS. This page has a simple and creative design. It contains a header with a title, a main section with text and images, and a footer for main details or cred
    4 min read
  • Design a Video Calling Website UI Template using HTML and CSS
    In this tutorial, we will learn the process of building a UI template for a Video Calling Website using HTML and CSS. Our goal is to create an attractive and user-friendly interface that makes video calls an enjoyable experience. The website will have a navigation bar with quick-access icons, a main
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences