-1

I saw this code below:

<div target="_blank" class="P5DMenuAnimated" style="left: -80.8112px; top: -80.8112px; background-position: left -40px; opacity: 1; width: 40px; height: 40px;" action="clone"></div>

I know in hyperlink, target="_blank" means that opening a new window. However, when I click this button, it doesn't open a new window, with some effect in the current page.

Shao-Kui
  • 776
  • 5
  • 11
  • This is not a valid question, you should use google for this – Dev Man Apr 04 '19 at 07:36
  • `
    ` does not have `target` attribute, it's just bad usage of it. Maybe some JS tries to use it?
    – Justinas Apr 04 '19 at 07:37
  • Possible duplicate of [target="\_blank" vs. target="\_new"](https://stackoverflow.com/questions/4964130/target-blank-vs-target-new) also this https://stackoverflow.com/questions/4425198/can-i-create-links-with-target-blank-in-markdown?rq=1 – weegee Apr 04 '19 at 07:53

1 Answers1

0

<div> doesn't have target attribute You can use target="_blank" in <a>, for example

The target attribute specifies where to open the linked document.

The target attribute can have one of the following values:

  • _blank - Opens the linked document in a new window or tab
  • _self - Opens the linked document in the same window/tab as it was clicked (this is default)
  • _parent - Opens the linked document in the parent frame
  • _top - Opens the linked document in the full body of the window
  • framename - Opens the linked document in a named frame which was opened with JavaScript

source: W3Schools - HTML Links

yunzen
  • 32,854
  • 11
  • 73
  • 106
N0M4D
  • 36
  • 2
  • 7
  • 1
    Thanks! That solves my problem...Im new to html...I just don't know whether div is able to use target attri... – Shao-Kui Apr 04 '19 at 10:27