How to open pdf file to another tab in browser

Last updated 3 years, 3 months ago | 1935 views 75     5

Tags:- HTML

HTML | Target attribute

To open a pdf file we can use the target attribute of the anchor tag. The target attribute of the anchor tag specifies where to open the linked document.

Syntex for using an anchor tag with target attribute is:

<a href="url" target="target_value">Link text</a>

Let's try an example which will open the linked document in a new browser window:

<html>
<head>
<title>anchore tag with target blank</title>
<head>
<body>
<a href="http://www.studyzone4u.com/" target="_blank">Visit StudyZone4U.com!</a>
</body>
</html>