w3pop.com :: 网络学院 :: HTML :: HTML <a>标签
The <a> tag defines an anchor. An anchor can be used in two ways:
<a>标签能够定义锚点,锚点的用途有两种:
NONE
无
Note: A linked page is normally displayed in the current browser window, unless you specify another target.
注意:连接到的页面一般都是在原有的窗口中显示出来,除非你指定了其它的target属性值。
| Source | Output |
|---|---|
|
<p>连接到 W3pop: <p> |
连接到W3pop: W3pop 在新窗口中打开W3pop: W3pop |
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
DTD所允许的示意为:S=Strict[严密型], T=Transitional[过渡型], 以及 F=Frameset[框架型]
| Attribute 属性 |
Value 值 |
Description 描述 |
DTD |
|---|---|---|---|
| charset | character_encoding | Specifies the character encoding of the target URL 指定目标URL的字符编码 |
STF |
| coords |
if shape="rect" then if shape="circ" then if shape="poly" then |
Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps 为图片指定合适的坐标范围 |
STF |
| href | URL | The target URL of the link 连接的URL |
STF |
| hreflang | language_code | Specifies the base language of the target URL 指定目标URL所使用的基本语言 |
STF |
| name | section_name | Names an anchor. Use this attribute to create a bookmark in a document. 锚点的命名。使用该属性可以建立文档的书签 In future versions of XHTML the name attribute will be replaced by the id attribute!! |
STF |
| rel | alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark |
Specifies the relationship between the current document and the target URL 指定当前文档与目标URL之间的关系 |
STF |
| rev | alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark |
Specifies the relationship between the target URL and the current document 指定目标URL与之间当前文档的关系 |
STF |
| shape | rect rectangle circ circle poly polygon |
Defines the type of region to be defined for mapping in the current area tag. Used with the coords attribute. 使用coords属性为当前区域的标签指定热点类型 |
STF |
| target | _blank _parent _self _top |
Where to open the target URL.
|
TF |
| type | mime_type | Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL 指定目标URL的MIME(延伸性多用途网际邮件)类型 |
STF |
| id, class, title, style, dir, lang, xml:lang, tabindex, accesskey |
For a full description, go to Standard Attributes.
查看完整描述请前往标准属性参考
| onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
查看完整的相关描述,请前往事件属性参考
Create hyperlinks
How to create hyperlinks.
建立超级连接
An image as a link
How to use an image as a link.
使用图片作为连接
Open a link in a new browser window
How to open a link in a new browser window, so that the visitor does not have to leave your Web site.
在新窗口打开连接
Link to a location on the same page
How to link to a bookmark.
连接到书签
Break out of a frame
How to break out of a frame (if your site is locked in a frame).
脱离框架
Create a mailto link
How to link to a mail message (will only work if you have mail installed).
建立邮件连接
Create a mailto link 2
Another mailto link.
另一种邮件连接
评论 (0)
All