html文字属性的学习目标
The <a target>
attribute specifies where to open the linked document in an a
(anchor) tag.
的<a target>
属性指定在何处打开在所链接的文档a
(锚)标签。
<目标>的示例 (Examples of <a target>)
A target attribute with the value of “_blank” opens the linked document in a new window or tab.
值为“ _blank”的目标属性会在新窗口或选项卡中打开链接的文档。
<a href="https://www.freecodecamp.org" target="_blank">freeCodeCamp</a>
A target attribute with the value of “_self” opens the linked document in the same frame as it was clicked (this is the default and usually does not need to be specified).
值为“ _self”的目标属性会在单击链接的同一帧中打开链接的文档(这是默认设置,通常无需指定)。
<a href="https://www.freecodecamp.org" target="_self">freeCodeCamp</a>
<a href="https://www.freecodecamp.org">freeCodeCamp</a>
A target attribute with the value of “_parent” opens the linked document in the parent frame.
值为“ _parent”的目标属性将在父框架中打开链接的文档。
<a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>
A target attribute with the value of “_top” opens the linked document in the full body of the window.
值为“ _top”的目标属性将在窗口的整个正文中打开链接的文档。
<a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>
A target attribute with the value of “framename” opens the linked document in a specified named frame.
值为“ framename ”的目标属性将在指定的命名框架中打开链接的文档。
<a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>
相关链接: (Related links:)
翻译自: https://www.freecodecamp.org/news/the-a-target-html-attribute-explained/
html文字属性的学习目标