超链接的设置
<a herf="http://gov.sina.com.cn/" target="_self"></a>
超链接的属性
1.herf
主要点击后需要跳转到的网站
2.target
在 HTML 中,超链接的 target 属性用于指定链接将在何处打开。它有以下几个可选值:
_self
:在当前窗口或标签页中打开链接(默认值)。_blank
:在新窗口或标签页中打开链接。_parent
:在当前页面的父级窗口中打开链接。_top
:在当前页面的最顶层窗口中打开链接。- 一个具体的窗口或框架的名称:在指定的窗口或框架中打开链接。
例如,以下代码将在新的标签页中打开链接:
<a href="https://www.example.com" target="_blank">Example</a>
以下代码将在一个名为 “myFrame” 的框架中打开链接:
<a href="https://www.example.com" target="myFrame">Example</a>