Form
<a href="URL"> ... </a>
<a name="Anchor name"> ... </a>
<a href="URL" target="Target name"> ... </a>
Attributes
attribute |
default |
description |
id |
none |
specifies the unique ID |
class |
none |
specifies the style sheet class |
style |
none |
specifies the style sheet |
href |
none |
specifies the URL of the linked resource |
name |
none |
specifies the anchor name which defines the destination to link to within the same page |
target |
none |
displays the page to link to in the specified target window |
Explanation
The a tag specifies links or anchors. If linking to the sample.html file in the same directory (folder), you should specify <a href="sample.html"> ... </a>. If linking to the sample.html within the info folder in the same hierarchy level, you should specify <a href="info/sample.html"> ... </a>. If linking to the sample.html file in the next upper level, you should specify <a href="../sample.html"> ... </a>.
The tag allows you to link to other web sites. If linking to the site "http://www.openspc2.org/", you should specify <a href="http://www.openspc2.org/"> ... </a>. You may also specify other protocols such as not only 'http:' protocol but also 'https:' and 'ftp:' protocol.
When specifying an anchor, you should use the name attribute. If specifying (creating) the anchor named chapter1, type <a name="chapter1"> ... <a>. If linking to this anchor, specify the #. Type <a name="chapter1"> ... <a>, and a click allows to jump to the anchor chapter1.
When clicking on a link, the target attribute is used to make it's destination display in a subwindow (new window) or frame. Each value, (_selfA_blankA_parentAand _top), which are what may be specified in the target attribute, execute the specified action. The _self displays the linked content in the same frame. The _blank displays it in a new window. The _parent displayed it in the immediate frameset parent. The _top displays it in the full window. The value _media displays the media content in the Media Bar content area and is valid for
Internet Explorer 6 in Windows XP SP1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
</head>
<body>
<h1>Sample</h1>
<p>
<a href="info.html">to the information page</a><br>
<a href="http://www.openspc2.org/">OpenSpace</a>
</p>
</body>
</html>