Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What Is an HTML Popup?

Eugene P.
Eugene P.

A popup when using HyperText Markup Language (HTML) is a separate display window that opens independently of the web page being viewed. There are a number of factors that can affect how, when and even if an HTML popup is displayed, although the default behavior of a web browser usually is to create a separate window that has only a title bar and frame, excluding toolbars or other navigation elements the browser normally would show. The HTML popup originally was designed as a way for a website to display information about some item on a page without leaving the page from which the popup originated. The mechanism for an HTML popup can be exploited for malicious purposes, so many web browsers provide features that prevent popup windows from appearing, making them a difficult navigational tool to employ in some cases.

One of the easiest ways to generate an HTML popup is to set the target frame for a standard anchor link to the value "blank". This means that, instead of causing the web browser to load the HTML document into a frame within the current page layout, a new browser window will be created and the page loaded into that new window. Using a blank frame to generate an HTML popup is a simple way to allow a user to view large images by clicking on a thumbnail, load a multimedia file such as a video, or to see the definition of a word without forcing a separate page to load in the current window. Using a blank frame does not provide a great amount of control over how the popup window will appear when generated.

Clicking an image on a webpage often leads to a popup featuring a larger version of the image.
Clicking an image on a webpage often leads to a popup featuring a larger version of the image.

A more common method used to invoke an HTML popup is to employ JavaScript®. Using the scripting language, a new window can be created in response to some user input, such as clicking on a link or passing over a link. The size and components of the window being created also can be controlled so it more neatly frames and displays the information it contains.

One of the easiest ways to generate an HTML popup is to set the target frame for a standard anchor link to the value "blank".
One of the easiest ways to generate an HTML popup is to set the target frame for a standard anchor link to the value "blank".

There are some problems that can be encountered when using an HTML popup on a website. The most common is that browsers can prevent a popup from appearing as a solution to the risk of their being used for malicious attacks or other purposes. A related complication is that some browsers will show errors if an HTML popup attempts to load a document on a separate server, usually for security purposes. In some situations, certain features of a popup window might not be implemented identically in all browsers, possibly causing the code for the window to be disregarded.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • Clicking an image on a webpage often leads to a popup featuring a larger version of the image.
      By: Marek
      Clicking an image on a webpage often leads to a popup featuring a larger version of the image.
    • One of the easiest ways to generate an HTML popup is to set the target frame for a standard anchor link to the value "blank".
      By: spaxiax
      One of the easiest ways to generate an HTML popup is to set the target frame for a standard anchor link to the value "blank".