How To Make A Banner Clickable

Table of contents:

How To Make A Banner Clickable
How To Make A Banner Clickable

Video: How To Make A Banner Clickable

Video: How To Make A Banner Clickable
Video: How to make your Advertising Banners Clickable' 2024, December
Anonim

Despite a significant decline in popularity since its inception, banners today still remain one of the main advertising media on the Internet. The simplest banner is a simple image. But in order for it to fully perform its function, you need to make it clickable.

How to make a banner clickable
How to make a banner clickable

It is necessary

the ability to change the markup of the web page

Instructions

Step 1

Make the banner clickable by placing it in a hyperlink. Use the HTML element A. Add a start tag with an href attribute that points to the target resource, as well as an end tag. For example: This is the simplest and most commonly used way to add banners to web pages. In fact, the image here is the anchor of the link.

Step 2

Apply client maps to create multiple hotspots in the banner image. In the HTML markup of your document, add a MAP element with a name attribute that specifies the name of the map. In the MAP, place one or more AREA children with the correct href, shape and coords attributes. For example: For the IMG element defining the banner, add a usemap attribute that refers to the client map. For example: This method allows you to use one banner to redirect the user to different resources, depending on which of the areas has been activated.

Step 3

Use the ability to handle user input events by client scripts to initiate the process of switching to another resource when clicking on a banner. Set the onclick handler to the appropriate document element. This can be done by adding the onclick attribute to the HTML markup: or directly from the script: This method allows you to flexibly control the process of user redirection when clicking on a banner, but does not work when scripts are disabled in the browser.

Step 4

Embed the banner in the web page using the INPUT element of type image included in the form to make it clickable. An INPUT element with a type attribute of image defines a graphical submit button. The image resource address is specified by the src attribute. For example: Application of this method of displaying a banner provides great opportunities. So, you can send a large amount of additional data to the server using hidden fields, especially using a POST request to submit a form. You can perform some action on the form before submitting by assigning an onsubmit handler. It is permissible to assign a client map to a button image using the usemap attribute.

Recommended: