定义
表示超链接的起始或目的位置。
Designates the start or destination of a hypertext link.
注释
元素a需要指定 href 或 name 属性。
文本和图像都可包含在锚内。作为锚的图像有一个边框,该边框颜色表明该链接是否被访问过。要避免显示此边框,你可设置 img 元素的 BORDER 标签属性为 0 或者省略 BORDER 标签属性。你还可以使用样式表 CSS 来覆盖 a 和 img 元素的默认外观。
注意 当对象table包含在 a 标签内时可能工作不正常。
如果对元素 A 应用 time2 行为的话,那么该元素仅当在时间线上激活时才会变成链接。
此元素在Internet Explorer 3.0及以上版本 的 HTML 和脚本中可用。
此元素是内嵌元素。
此元素需要关闭标签。
The a element requires the href or the name property to be specified.
Both text and images can be included within an anchor. An image that is an anchor has a border whose color indicates whether the link has been visited. To prevent this border from displaying, you can set the img element's BORDER attribute to 0 or omit the BORDER attribute. You can also use Cascading Style Sheets (CSS) attributes to override the default appearance of a and img elements.
Note A table object does not function properly when contained within an a tag.
If the time2 behavior is applied to the A element, it will become a link only when it is active on the timeline.
This element is available in HTML and script as of Internet Explorer 3.0.
This element is an inline element.
This element requires a closing tag.
示例代码
<!-- Link to a server. 链接到服务器 -->
<A HREF="http://www.blabla.cn">布啦布啦主页</A>
<!-- Link to a file in the same directory. 链接到同一目录的文件 -->
<A HREF="home.htm">home.htm</A>
<!-- Open a file in the window specified by TARGET. 在由 TARGET 指定的窗口中打开文件 -->
<A TARGET="viewer" HREF="sample.htm">Open in window</A>
<!-- Include an IMG element as a part of the link. 将 IMG 元素作为链接的一部分。-->
<A HREF="http://www.blabla.cn"><IMG src="http://www.ajaxstu.com/Files/File/2007-11/24/5G58FHG2DHFC8716AF.gif"">link</A>
<!-- Link to an anchor. 链接到锚。-->
<A HREF="#anchor">anchor</A>
<!-- Define an anchor. 定义一个锚 -->
<A NAME="anchor">
<!-- Invoke a JScript function 调用 JScript 函数-->
<A HREF="javascript:window.open()">link</A>
HTML元素 - a
原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]
相关文章:
- html:语言代码(2007-3-6 8:25:54)
- html:特殊符号和 BIDI 文本的字符项目(2007-2-3 11:6:38)
- 网页配色之一(2006-10-4 4:33:50)
- HTML 额外的命名项目(2006-7-15 4:8:50)
- html:字符集识别(2006-6-23 1:25:33)
- HTML元素 - acronym(2006-6-11 8:59:22)
- HTML颜色参考(2006-1-6 9:3:3)
- html:ISO Latin-1 字符集(2006-1-6 2:49:39)
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
