What Is The HTML Target Attribute?
Có thể bạn quan tâm
Overview
The target attribute in HTMLHyperText Markup Language is used to set or specify where we want to open the linked document. We can use the target attributes on the following elements listed below:
- <a>
- <area>
- <base>
- <form>
Syntax
<element target="_blank|_self|_parent|_top|framename"\>Parameters
-
_blank: This is used to open the link in a new window.
-
_self: This is the default value. It is used to open the link in the same window.
-
_top: This is used to open the document linked in the full body.
-
_parent: This is used to open the link in the parent frameset.
-
framename: The document is opened in the specific frame name.
Example
The HTML code provided below demonstrates how to use the target attribute:
OutputHTMLExplanation
The link is opened in the new window because the target attribute is set to _blank. We can also set the parameters according to our own choice.
Relevant Answers
Explore Courses
Free Resources
License: Creative Commons-Attribution-ShareAlike 4.0 (CC-BY-SA 4.0)Từ khóa » Html5 A Tag Target
-
HTML A Target Attribute - W3Schools
-
How To Use The To Make Links & Open Them Where You Want! »
-
: The Anchor Element - HTML: HyperText Markup Language | MDN
-
When To Use Target="_blank" | CSS-Tricks
-
The A Target HTML Attribute Explained - FreeCodeCamp
-
HTML | Target Attribute - GeeksforGeeks
-
Is It Alright To Use Target="_blank" In HTML5? - Stack Overflow
-
Don't Use The Target="_Blank" Link Attribute In These Cases
-
A – Hyperlink (CHANGED) - HTML5 - W3C On GitHub
-
In This Section, We Will See The Use Of Target Attribute Of Anchor Tag In ...
-
HTML Tutorial => Target Attribute In Form Tag
-
The Target Attribute Of Anchor Tag In HTML - HTML Tutorial 35
-
HTML Link Target Attribute
-
Target Attribute Reference For Anchor Tags In HTML - DigitalOcean