HTML and CSS Reference
In-Depth Information
Examples
<!-- anchor linking to external file -->
<a href="http://www.democompany.com/">
External Link
</a>
<!-- anchor linking to file on local file system -->
<a href="file:/c:\html\index.html">
local file link
</a>
<!-- anchor invoking anonymous FTP -->
<a href="ftp://ftp.democompany.com/freestuff">
Anonymous FTP
link
</a>
<!-- anchor invoking FTP with password -->
<a href="ftp://joeuser:secretpassword@democompany.com/path/file">
FTP with password
</a>
<!-- anchor invoking mail -->
<a href="mailto:fakeid@democompany.com">
Send mail
</a>
<!-- anchor used to define target destination within document -->
<a name="jump">
Jump target
</a>
<!-- anchor linking internally to previous target anchor -->
<a href="#jump">
Local jump within document
</a>
<!-- anchor linking externally to previous target anchor -->
<a href="http://www.democompany.com/document#jump">
Remote jump to a position within a document
</a>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 4+, Safari 1+
Notes
• If you use the
accesskey
attribute with this element page, be wary of reserved
bindings. See the section “accesskey” under “Other Common Attributes Reference”
earlier in the chapter for a full discussion of this concern.
• The
target
attribute is not defined in browsers that do not support frames, such as
Netscape 1-generation browsers. Furthermore,
target
is not allowed under strict
variants of XHTML but instead is limited to frameset or transitional form. This
attribute, however, does regain its functionality under HTML5.
• See Appendix D for a complete discussion of the URL syntax, which is used as the
value of the
src
attribute.
<abbr> (Abbreviation)
This element allows authors to clearly indicate a sequence of characters that defines an
abbreviation for a word (such as Mr. instead of Mister, or Calif instead of California).