The Wayback Machine - https://web.archive.org/web/20240915071945/https://www.geeksforgeeks.org/how-to-create-a-client-side-image-map-in-html5/
Open In App

How to create a client-side image-map in HTML5 ?

Last Updated : 20 Oct, 2020
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In this article, we will create a client-side image map by using an <img> tag. The <img> tag is used to add images on a webpage. This tag is an empty tag which means it can contain only a list of attributes and it has no closing tag.

Syntax:

<img src="url" alt="some_text" usemap="#mapname">

Example:





Output:

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Similar Reads

Server Side Rendering vs Client Side Rendering vs Server Side Generation
In the world of web development, there are several approaches to rendering web pages: server-side rendering, client-side rendering, and server-side generation. Each approach has its own advantages and disadvantages, and choosing the right one for your project depends on your specific needs and goals. In this blog, we’ll explore the differences betw
4 min read
Difference between Server-Side AJAX framework and Client-side AJAX framework ?
The article focuses on discussing the differences between the Server-side AJAX framework and the Client-side AJAX framework. The following topics will be discussed here: What is a Server-side AJAX framework?What is a Client-side AJAX framework?Server-side AJAX framework vs Client-side AJAX framework Let's start discussing each of these topics in de
3 min read
Server side and Client side Programming
Server-side Programming : It is the program that runs on server dealing with the generation of content of web page. 1) Querying the database 2) Operations over databases 3) Access/Write a file on server. 4) Interact with other servers. 5) Structure web applications. 6) Process user input. For example if user input is a text in search box, run a sea
2 min read
How does SSR(Server-Side Rendering) differ from CSR(client-side rendering) ?
Server-Side Rendering (SSR) and Client-Side Rendering (CSR) are two different approaches used in web development to render web pages to users. Each approach has its own set of advantages and disadvantages. In this article, we will learn about the difference between SSR and CSR with examples and features. Table of Content Server-Side Rendering (SSR)
4 min read
How to define a client-side script in HTML5 ?
To define a client-side script in HTML5, we can do &lt;script&gt; tag or adding external script file by src attribute to the HTML file. &lt;script&gt; tag contains the JavaScript to be added for the client-side scripting. Syntax: &lt;script&gt; // JavaScript goes here console.log('GeeksforGeeks'); &lt;/script&gt; Below are the examples for the abov
1 min read
How to specify an image as a server-side image-map in HTML ?
In image mapping, an image is specified with certain set of coordinates inside the image which act as hyperlink areas to different destinations. It is different from an image link since in image linking, an image can be used to serve a single link or destination whereas in a mapped image, different coordinates of the image can serve different links
1 min read
What is image map & how to map the image in HTML ?
In this article, we will discuss an image map in HTML, along with understanding its implementation through examples. An Image Map refers to the clickable image having a clickable area that can be used to navigate to the various links to other web pages or the specific section of the same web page. The &lt;map&gt; tag can be used to define the image
2 min read
What is Client-Side Filter Bypass?
Many websites lack client-side filter checks, so it becomes easy to bypass that. But, our bypass will only be successful if there is no server-side filter check either. First, let's dig a little bit about the client-side filter bypass. Client-Side FilterThese filters ensure that the input given by the user is in the correct format. Basically, this
2 min read
How to set alternate content for users that do not support client-side scripts ?
In this article, we define an alternate content for users that do not support client-side scripts by using &lt;noscript&gt; tag in the HTML document. It is used to display the text for those browsers that does not support script tag or the browsers disable the script for the user. Syntax: &lt;noscript&gt; Contents... &lt;/noscript&gt; Example: &lt;
1 min read
How to Receive JSON Data at the Client Side ?
For sending and receiving data to or from the server JSON format is used. JSON stands for Javascript Object Notation and it is a widely used format nowadays because of its advantages and simplicity. In this article, we will use XML HttpRequest to receive data from the server and use NodeJS for the backend for sending JSON data. Example: The below e
2 min read
How to Generate/Send JSON Data at the Client Side ?
Javascript Object Notation (JSON) is a widely used format for sending and receiving data to or from the server. In this article, we will use fetch API to send and receive data from the NodeJS server. Advantages of JSON: Because of its easy and small syntax, it executes the response in a faster way.It is supported by a wide range of browsers.Parsing
3 min read
How to implement client-side routing in React?
Client-side routing is a fundamental concept in modern single-page applications (SPAs) that allows for navigation within the application without a full page reload. In React, libraries like React Router provide the tools necessary to implement client-side routing seamlessly. In this article, we will explore the process of implementing client-side r
3 min read
How to send data from client side to Node.js server using Ajax without page reloading ?
In this article, we are learning about how can we send data to a node server using Ajax without reloading the page from the client-side. Approach: We are creating a button in HTML document on the client-side when the button is pressed a request is made on our node server and the object is received at our server without reloading the page. This can
2 min read
How to place two div side-by-side of the same height using CSS?
The two or more different div of same height can be put side-by-side using CSS. Use CSS property to set the height and width of div and use display property to place div in side-by-side format. The used display property are listed below: display:table; This property is used for elements (div) which behaves like table.display:table-cell; This proper
2 min read
How to place SVG icons on a round circle side by side to another div using Bootstrap?
Bootstrap Icons are SVGs, so they scale quickly and easily and can be styled with CSS. Approach: We can place the SVG icons and give them the shape of a circle. This will make the SVG icons appear to be in a circular shape. This can be achieved using a Bootstrap class called "rounded-circle" Syntax: &lt;img class = "rounded-circle" src = "..." alt
2 min read
How To Place Tables Side by Side using HTML and CSS
In this article, we will learn how to place tables side by side using HTML and CSS. To place tables side by side, first, we create two tables using &lt;table&gt; tag and then apply some CSS styles to place both tables side by side. Place Tables Side by SideExample: Here, we place two Tables Side by Side using HTML and CSS. [GFGTABS] HTML &lt;!DOCTY
2 min read
How to Align Images Side By Side using CSS ?
In this article, we will understand how we can Align Images Side By Side using CSS. In CSS, there are many properties to use and align the images, and we can also use JavaScript for that work. but we will perform it using CSS only. Basically, Aligning images side by side means placing two or more image side by side means consecutively one after one
4 min read
How to float three div side by side using CSS?
Floating three div elements side by side using CSS means aligning them horizontally in a row. This is done by applying float: left; to each div, which moves them to the left of the parent container, allowing them to sit next to each other. These are the following ways to solve this problem: Table of Content Using float propertyUsing display propert
3 min read
Create a Map with Google Map Api using React-Native
In this project, we'll explore how to integrate Google Maps into a React Native application. We'll create a dynamic map that allows users to view their current location and interact with markers on the map. This project aims to provide a practical guide for developers looking to incorporate maps into their mobile applications using React Native. Ou
3 min read
How to create an image acting as a submit button using HTML5 ?
In this article, we will learn how to create an image that acts as a submit button i.e. whenever we click on an image in the form, it will be automatically submitted to the server. The default type of &lt;input&gt; type attribute is text. Here, we use a simple approach to complete the task. Syntax &lt;input type = "image"&gt;Attribute Value: image:
2 min read
How to create an image map in JavaScript ?
An image map is nothing but an image that is broken into various hotspots and each hotspot will take you to a different file. Hotspots are nothing but clickable areas which we create on an image by using the &lt;area&gt; tag. This type of map is called a client-side image map as the map is embedded in the HTML itself. Approach: Below is the step-by
3 min read
How to Create an Image Map in HTML ?
An image map is a graphical representation that allows you to define clickable areas (or "hotspots") within an image. Each hotspot can be associated with a hyperlink, making different parts of the image interactive. Image maps are commonly used for navigation menus, interactive diagrams, and geographic maps. Using the &lt;map&gt; and &lt;area&gt; T
2 min read
How to create an area inside an image-map using HTML?
To define clickable regions within an image map in an HTML document, use the &lt;area&gt; tag. This tag directs users to different links when they click on specific areas of the mapped image. It is nested within the &lt;map&gt; tag as a child element. In HTML, &lt;area&gt; is self-closing. Syntax:&lt;area&gt; Contents &lt;/area&gt; Example: The exa
1 min read
PHP | Ds\Map map() Function
The Ds\Map::map() function of the Map class in PHP is used to apply a callback function to a Map object. This returns the result of applying the callback function to each value present on the map. The function does not update the values in the original map, instead, it just returns the result of the updates without affecting the original values. Sy
2 min read
How to map array values without using map method in JavaScript ?
Array elements can be mapped by using looping methods in JavaScript. The map() method creates a new array with the results of the output of a function called for each array element. This can also be implemented using a for loop in JavaScript. Approach 1: For this, we can create two arrays, in which one array contains the array elements that are to
3 min read
How to make image maps in HTML5 ?
The HTML &lt;map&gt; tag is used to define image maps in HTML. The areas inside the image which are clickable are defined by using the &lt;area&gt; tag. The main idea of this concept is that whenever we click on the image it should perform any action. For creating an image map we have to add usemap as an attribute to the &lt;img&gt; tag. Syntax:
1 min read
How to specify the hyperlink target for the area of an image in HTML5 ?
The href attribute is used to specify the hyperlink target for the area in HTML5. The area tag is not a hyperlink in itself. The &lt;a&gt; tag should always have an opening as well as a closing tag. The coords attribute is obsolete on an element. Instead, always use the area tag for the image map where coords attribute can be used within the area t
1 min read
Create a Hoverable Side Navigation with HTML, CSS and JavaScript
To create hoverable side navigation with icon on any website there is a need for two things HTML and CSS. If you want to attach the icons on the navigation bar then you need a font-awesome CDN link. These features make the website looks cool than a normal website where the nav-bar is old-school design. In this article, we will create the structure
4 min read
PHP | Determining Client IP Address
What is an IP Address? The IP address stands for Internet Protocol Address. An IP address is used to provide an identity to a networked device.IP addresses allow the location of different digital devices that are connected to the Internet to be pinpointed and differentiated from other devices. In this post we have discussed two different ways of de
2 min read
How to get the client timezone offset in JavaScript?
The client's timezone offset could be detected by using the Date object's getTimezoneOffset() method. The getTimezoneOffset() method returns the time difference between UTC time and local time, that is the time offset, in minutes. This offset is changed by dividing by 60 and negating the result. Note: The getTimezoneOffset() does not account for Da
1 min read