Technology Help Website: Open Links in a New Window

For accessibility and usability reasons most links should not open a new browser window.

Only under the following circumstances should you set a target on a link to open in a new window:

  • If opening a link in the same window will disrupt the flow of a form or other process.
  • If opening a link will log you out of a system.

If a link does open a new window you must inform the user by adding the new window icon Open new window..

Opening a link in a new window

Assuming you are in edit mode:

  1. Change the Text Format to Full HTML on the content field where you need to create a link that opens in a new window. The Text Format is located below the content region on the left.
    Text format drop-down menu with Full HTML selected.
  2. Click the Source button on the formatting toolbar to switch into HTML mode.
  3. Copy the following html code and paste it where you would like the new window icon to appear (following the text that will become a link)
    <img style="display:inline;" src="https://it.umn.edu/sites/itumn.umn.edu/files/styles/folwell_full/public/images/up-right-from-square-solid-sm-copy.png?itok=-WBFROFe" alt="Opens new window." width="20" height="20">
  4. Click the Source button on the formatting tool bar again to switch back into regular editing mode.
  5. Select the link text and the new window icon.
  6. Click the Link button link button in the formatting toolbar.
  7. Enter the fully qualified URL (refer to Creating External Links in Drupal).
  8. Click Advance to expand the drop-down menu.
  9. Select Open in a new window.
  10. Click the green check-mark to Save.

Last modified

Changed

TDX ID

TDX ID
7738